ci: Swap flake and isort for ruff and reorder jobs - #9056
Conversation
Ruff provides the same checks but runs a native code that is faster. It could be used also instead of black but current codebase would need to be reformatted first as ruff and black have different opinions on some cases. Do not run python-system-tests when tests/system were not changed. Run python-system-tests before codeql (which is building sssd) to get its results much faster.
| cancel-in-progress: true | ||
| jobs: | ||
| codeql: | ||
| changes: |
There was a problem hiding this comment.
files-changed instead?
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| - uses: actions/checkout@v7 | ||
| - uses: dorny/paths-filter@v3 |
There was a problem hiding this comment.
dorny/paths-filter@v4 according to https://github.com/dorny/paths-filter/blob/master/README.md
| filters: | | ||
| system_tests: | ||
| - 'src/tests/system/**' | ||
| - '.github/workflows/static-code-analysis.yml' |
There was a problem hiding this comment.
Why is the github/workflows/static-code-analysis.yml file included here?
|
Could you please also update https://github.com/SSSD/sssd-test-framework/blob/master/.github/workflows/ci.yml which runs these same python checks? |
|
Claude-Opus also suggests: 7 2. |
danlavu
left a comment
There was a problem hiding this comment.
Just one question, otherwise it looks good.
| - '.github/workflows/static-code-analysis.yml' | ||
|
|
||
| python-system-tests: | ||
| needs: changes |
There was a problem hiding this comment.
I like it, because it will reduce resources but shouldn't we be running tests each time there is a build? Not when the tests are modified?
I suppose we will find failures during the scheduled run.
Ruff provides the same checks but runs a native code that is faster. It could be used also instead of black but current codebase would need to be reformatted first as ruff and black have different opinions on some cases.
Do not run python-system-tests when tests/system were not changed. Run python-system-tests before codeql (which is building sssd) to get its results much faster.