chore: whitelist tag_release.py for release automation #13
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-test: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint (flake8) | |
| run: | | |
| python -m flake8 src tests | |
| - name: Format check (black) | |
| run: | | |
| python -m black --check src tests | |
| - name: Run tests (pytest) | |
| run: | | |
| python -m pytest -q --disable-warnings --maxfail=1 --cov=src --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov (public repos only) | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| flags: ${{ matrix.os }}-py${{ matrix.python-version }} | |
| fail_ci_if_error: true | |
| continue-on-error: true | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-${{ matrix.python-version }} | |
| path: ./coverage.xml | |
| if-no-files-found: ignore | |
| summary: | |
| name: CI Summary | |
| runs-on: ubuntu-latest | |
| needs: build-test | |
| if: always() | |
| steps: | |
| - name: Generate summary | |
| run: | | |
| echo "All matrix jobs finished: ${{ needs.build-test.result }}" >> $GITHUB_STEP_SUMMARY |