Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ on:
- "**.py"
- ".github/**"
- "pyproject.toml"
- "requirements*"
- "requirements*.txt"

defaults:
run:
shell: bash

jobs:
Pytest:
name: Test on ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -24,35 +25,40 @@ jobs:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@main
- name: Set up Python
- 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: pip
cache-dependency-path: |
requirements.txt
requirements-tests.txt
requirements-optional.txt
requirements-tests.txt
pyproject.toml

- name: Install rocketpy
run: pip install .

- name: Test importing rocketpy
run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
- name: Upgrade pip
run: pip install --upgrade pip

- name: Install test dependencies
- name: Install all RocketPy dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-tests.txt
pip install -r requirements-optional.txt

# Install RocketPy itself with its "all" extras
pip install .[all]

- 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: |
pip install numpy --upgrade
pytest rocketpy --doctest-modules --cov=rocketpy --cov-append
run: pytest rocketpy --doctest-modules --cov=rocketpy --cov-append

- name: Run Integration Tests
run: pytest tests/integration --cov=rocketpy --cov-append
Expand Down
Loading