QTempGaussMC: Rewrite (#373) #2282
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: Test Python code | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/actions/**" | |
| - ".github/workflows/test.yml" | |
| - "**.py" | |
| - "pyproject.toml" | |
| pull_request: | |
| paths: | |
| - ".github/actions/**" | |
| - ".github/workflows/test.yml" | |
| - "**.py" | |
| - "pyproject.toml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| UV_NO_SYNC: "1" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: >- | |
| uv sync --locked | |
| --no-dev | |
| --group test | |
| --extra basic --extra kernels --extra expr --extra rg --extra denoise | |
| - name: Run tests | |
| run: uv run coverage run -m pytest tests | |
| - name: Convert coverage report to cobertura | |
| run: uv run coverage xml | |
| - name: Coveralls GitHub Action | |
| uses: coverallsapp/github-action@v2.3.8 | |
| with: | |
| file: coverage.xml | |
| format: cobertura | |
| parallel: true | |
| flag-name: ${{ join(matrix.*, ' - ') }} | |
| fail-on-error: false | |
| - name: Post webhook for failure | |
| if: failure() | |
| uses: Jaded-Encoding-Thaumaturgy/discord-failure-notifier@v1 | |
| with: | |
| webhook-url: ${{ secrets.WEBHOOK_URL }} | |
| post-test: | |
| needs: [test] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Mark Coveralls as finished | |
| uses: coverallsapp/github-action@v2.3.8 | |
| with: | |
| parallel-finished: true | |
| fail-on-error: false |