Skip to content

Revert "Update test.yml to run on release" #15

Revert "Update test.yml to run on release"

Revert "Update test.yml to run on release" #15

Workflow file for this run

name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
workflow_call:
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
needs: [ lint ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache-dependency-path: |
poetry.lock
pyproject.toml
- name: Install dependencies
run: poetry install --with dev --no-interaction
- name: Run tests
run: |
poetry run pytest tests/ --all -v \
--junitxml=junit.xml
env:
FORCE_COLOR: 1
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (Python ${{ matrix.python-version }})
path: junit.xml
publish-test-results:
name: "Publish Test Results"
needs: test
runs-on: ubuntu-latest
if: always()
permissions:
checks: write
pull-requests: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "artifacts/**/junit.xml"
check_name: "Test Results"
comment_mode: always
compare_to_earlier_commit: true