Feat spectral angle #403
Workflow file for this run
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: Run tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| env: | |
| # secrets cannot be referenced in step `if:` (schema); expose a boolean via env instead. | |
| HAS_BOT_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN != '' }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.6.6" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests with coverage | |
| run: uv run pytest tests --verbose --cov=winnow --cov-report xml:coverage.xml --cov-report term-missing --junitxml=pytest.xml --cov-fail-under=0 | |
| - name: pytest coverage comment | |
| id: coverageComment | |
| uses: MishaKav/pytest-coverage-comment@287292879eaaff04116f36d3eb1a670f6e5df1a4 | |
| with: | |
| pytest-xml-coverage-path: ./coverage.xml | |
| junitxml-path: ./pytest.xml | |
| # Dependabot (and some fork PRs) do not receive Actions secrets; skip gist update to avoid 401. | |
| - name: Create the badge | |
| if: env.HAS_BOT_TOKEN == 'true' | |
| uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 | |
| with: | |
| auth: ${{ secrets.BOT_ACCESS_TOKEN }} | |
| gistID: f6df3d7ac249eb608e631192d2efb25e | |
| filename: pytest-coverage-comment.json | |
| label: Test Coverage | |
| message: ${{ steps.coverageComment.outputs.coverage }} | |
| color: ${{ steps.coverageComment.outputs.color }} | |
| namedLogo: python |