diff options
author | toonn <toonn@toonn.io> | 2023-08-18 11:58:31 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2023-08-18 11:58:31 +0200 |
commit | 62b4aaf9fe9476ce3ed87c546fd5cbf169e6d6c0 (patch) | |
tree | 46466998468152d814022def96329f580de3ee37 | |
parent | 33221439290296295bfe3aad28aabfad5a002ba4 (diff) |
GHActions: Run complete PR workflow if changed
-rw-r--r-- | .github/workflows/pr.yml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 369f4106..57d8af92 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -25,30 +25,48 @@ jobs: with: list-files: 'shell' filters: | + this-workflow: + - modified: '.github/workflows/pr.yml' code: - added|modified: '!(ranger/config)**.py' config: - added|modified: 'ranger/config/**.py' - - name: Lint code with Flake8 and Pylint + - name: Lint changed code with Flake8 and Pylint if: steps.path-filter.outputs.code == 'true' + && steps.path-filter.outputs.this-workflow == 'false' run: | flake8 ${{ steps.paths-filter.outputs.code_files }} pylint ${{ steps.paths-filter.outputs.code_files }} - - name: Lint config with Flake8 and Pylint + - name: Lint all code with Flake8 and Pylint + if: steps.path-filter.outputs.this-workflow == 'true' + run: | + make TEST_PATHS_CONFIG= test_flake8 + make TEST_PATHS_CONFIG= test_pylint + - name: Lint changed config with Flake8 and Pylint if: steps.path-filter.outputs.config == 'true' + && steps.path-filter.outputs.this-workflow == 'false' run: | flake8 ${{ steps.paths-filter.outputs.config }} pylint --rcfile=ranger/config/.pylintrc \ ${{ steps.paths-filter.outputs.config_files }} + - name: Lint all config with Flake8 and Pylint + if: steps.path-filter.outputs.config == 'true' + && steps.path-filter.outputs.this-workflow == 'false' + run: | + make TEST_PATHS_MAIN= test_flake8 + make TEST_PATHS_MAIN= test_pylint - name: Run doctest if: steps.path-filter.outputs.code == 'true' + || steps.path-filter.outputs.this-workflow == 'true' run: | make test_doctest - name: Test code with Pytest if: steps.path-filter.outputs.code == 'true' + || steps.path-filter.outputs.this-workflow == 'true' run: | make test_pytest - name: Check man page completeness if: steps.path-filter.outputs.code == 'true' + || steps.path-filter.outputs.this-workflow == 'true' run: | make test_other |