Sam b5a3d6348f
Some checks failed
Build Simulation and Test / Run All Tests (push) Failing after 26s
Add conditional upload step for test results in workflow
2025-05-31 20:15:46 -05:00

39 lines
875 B
YAML

name: Build Simulation and Test
on:
push:
branches:
- master
jobs:
tests:
name: Run All Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run tests
run: uv run pytest tests --junit-xml=pytest-results.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: pytest-results
path: pytest-results.xml
retention-days: 5
- uses: actions/upload-artifact@v4 # upload test results
if: ${{ !cancelled() }} # run this step even if previous step failed
with:
name: pytest-results
path: pytest-results.xml