mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
When requirements change, both docs and lint should run
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
8fd73d1ab0
commit
6c2c2e772b
2 changed files with 17 additions and 8 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -51,11 +51,19 @@ jobs:
|
|||
repo:
|
||||
- added|modified:
|
||||
- '**'
|
||||
doc-requirements:
|
||||
- added|modified: &doc_requirements
|
||||
- requirements/static/ci/py3.*/docs.txt
|
||||
lint-requirements:
|
||||
- added|modified: &lint_requirements
|
||||
- requirements/static/ci/py3.*/lint.txt
|
||||
deleted:
|
||||
- deleted:
|
||||
- '**'
|
||||
docs:
|
||||
- doc/**
|
||||
- added|modified:
|
||||
- doc/**
|
||||
- *doc_requirements
|
||||
salt:
|
||||
- added|modified: &salt_added_modified
|
||||
- setup.py
|
||||
|
@ -66,9 +74,10 @@ jobs:
|
|||
tests:
|
||||
- added|modified: &tests_added_modified
|
||||
- tests/**/*.py
|
||||
pylintrc:
|
||||
lint:
|
||||
- added|modified:
|
||||
- .pylintrc
|
||||
- *lint_requirements
|
||||
testrun:
|
||||
- added|modified:
|
||||
- *salt_added_modified
|
||||
|
|
12
.github/workflows/lint-action.yml
vendored
12
.github/workflows/lint-action.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
|||
Salt:
|
||||
name: Lint Salt's Source Code
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['pylintrc'] }}
|
||||
if: ${{ fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }}
|
||||
|
||||
container:
|
||||
image: python:3.8.6-slim-buster
|
||||
|
@ -41,14 +41,14 @@ jobs:
|
|||
nox --install-only --forcecolor -e lint-salt
|
||||
|
||||
- name: Lint Changed Files
|
||||
if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['salt'] && ! fromJSON(inputs.changed-files)['pylintrc']
|
||||
if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['salt'] && ! fromJSON(inputs.changed-files)['lint']
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: YES
|
||||
run: |
|
||||
nox --forcecolor -e lint-salt -- ${{ join(fromJSON(inputs.changed-files)['salt_files'], ' ') }}
|
||||
|
||||
- name: Lint ALL Files
|
||||
if: github.event_name != 'pull_request' || fromJSON(inputs.changed-files)['pylintrc']
|
||||
if: github.event_name != 'pull_request' || fromJSON(inputs.changed-files)['lint']
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: YES
|
||||
run: |
|
||||
|
@ -71,7 +71,7 @@ jobs:
|
|||
Tests:
|
||||
name: Lint Salt's Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ fromJSON(inputs.changed-files)['tests'] || fromJSON(inputs.changed-files)['pylintrc'] }}
|
||||
if: ${{ fromJSON(inputs.changed-files)['tests'] || fromJSON(inputs.changed-files)['lint'] }}
|
||||
|
||||
container:
|
||||
image: python:3.8.6-slim-buster
|
||||
|
@ -100,14 +100,14 @@ jobs:
|
|||
nox --install-only --forcecolor -e lint-tests
|
||||
|
||||
- name: Lint Changed Files
|
||||
if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['tests'] && ! fromJSON(inputs.changed-files)['pylintrc']
|
||||
if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['tests'] && ! fromJSON(inputs.changed-files)['lint']
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: YES
|
||||
run: |
|
||||
nox --forcecolor -e lint-tests -- ${{ join(fromJSON(inputs.changed-files)['tests_files'], ' ') }}
|
||||
|
||||
- name: Lint ALL Files
|
||||
if: github.event_name != 'pull_request' || fromJSON(inputs.changed-files)['pylintrc']
|
||||
if: github.event_name != 'pull_request' || fromJSON(inputs.changed-files)['lint']
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: YES
|
||||
run: |
|
||||
|
|
Loading…
Add table
Reference in a new issue