ci(scorecard): add workflow_dispatch + document private-repo permissions #39
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, "claude/**"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[dev,qutip] | |
| - name: Lint | |
| run: ruff check src tests | |
| - name: Type check | |
| run: mypy src/liouscope | |
| continue-on-error: true | |
| - name: Run anchor regressions (must pass) | |
| run: pytest tests/test_anchors.py -v | |
| - name: Run full test suite | |
| run: pytest --cov=liouscope --cov-report=xml --cov-fail-under=80 -v | |
| - name: Upload coverage | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: coverage-xml | |
| path: coverage.xml |