Correctly detect whether option is actually changed #3716
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Python | |
| on: [pull_request, push] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.head_ref != '' }} | |
| jobs: | |
| ci: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Setup python (auxiliary scripts) | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3' # use default version | |
| - name: Install tools (auxiliary scripts) | |
| run: pip install bandit isort pycodestyle pyflakes | |
| - name: Gather files (auxiliary scripts) | |
| run: | | |
| export "PY_FILES=$(find . -type f -name '*.py' ! -path '*searchengine*' -printf '%p ')" | |
| echo $PY_FILES | |
| echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV" | |
| - name: Lint code (auxiliary scripts) | |
| run: | | |
| pyflakes $PY_FILES | |
| bandit --skip B101,B314,B405 $PY_FILES | |
| - name: Format code (auxiliary scripts) | |
| run: | | |
| pycodestyle \ | |
| --max-line-length=1000 \ | |
| --statistics \ | |
| $PY_FILES | |
| isort \ | |
| --check \ | |
| --diff \ | |
| $PY_FILES | |
| - name: Build code (auxiliary scripts) | |
| run: | | |
| python -m compileall $PY_FILES | |
| - name: Setup python (search engine) | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.9' | |
| - name: Install tools (search engine) | |
| working-directory: src/searchengine/nova3 | |
| run: | | |
| pip install uv | |
| uv sync | |
| - name: Check typings (search engine) | |
| working-directory: src/searchengine/nova3 | |
| run: uv run just check | |
| - name: Lint code (search engine) | |
| working-directory: src/searchengine/nova3 | |
| run: uv run just lint | |
| - name: Format code (search engine) | |
| working-directory: src/searchengine/nova3 | |
| run: | | |
| uv run just format | |
| git diff --exit-code | |
| - name: Build code (search engine) | |
| working-directory: src/searchengine/nova3 | |
| run: uv run just build |