Skip to content

DEV: Workflow Debug #2477

DEV: Workflow Debug

DEV: Workflow Debug #2477

Workflow file for this run

name: Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "**.py"
- ".github/**"
- "pyproject.toml"
- "requirements*.txt"
defaults:
run:
shell: bash
jobs:
Pytest:
name: Test on ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, 3.13]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
requirements-optional.txt
requirements-tests.txt
pyproject.toml
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install all RocketPy dependencies
run: |
# Core + optional dependencies
pip install -r requirements.txt
pip install -r requirements-optional.txt
# Install RocketPy itself with its "all" extras
pip install .[all]
# Test‐only deps
pip install -r requirements-tests.txt
- name: Test importing rocketpy
run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
- name: Run Unit Tests
run: pytest tests/unit --cov=rocketpy
- name: Run Documentation Tests
run: pytest rocketpy --doctest-modules --cov=rocketpy --cov-append
- name: Run Integration Tests
run: pytest tests/integration --cov=rocketpy --cov-append
- name: Run Acceptance Tests
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml
- name: Upload coverage to artifacts
uses: actions/upload-artifact@main
with:
name: coverage
path: coverage.xml
overwrite: true
if-no-files-found: error
CodecovUpload:
needs: Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Download latest coverage report
uses: actions/download-artifact@main
- name: Upload to Codecov
uses: codecov/codecov-action@main
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
coverage.xml