ENH: Controller (AirBrakes) and Sensors Encoding #2547
Workflow file for this run
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: Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| - "**.py" | |
| - ".github/**" | |
| - "pyproject.toml" | |
| - "requirements*" | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| Pytest: | |
| 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: | |
| - uses: actions/checkout@main | |
| - name: Set up Python | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-tests.txt | |
| requirements-optional.txt | |
| - 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: Install test dependencies | |
| run: | | |
| pip install -r requirements-tests.txt | |
| pip install .[all] | |
| - 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 | |
| - 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 |