Use nox for our GitHub Actions workflows #1867
Workflow file for this run
This file contains 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: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
fail-fast: false | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup nox | |
uses: wntrblm/nox@2024.10.09 | |
with: | |
python-versions: ${{ matrix.python-version }} | |
- name: Typecheck | |
run: nox -s typecheck | |
- name: Test | |
run: nox -s tests -- --verbose --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | |
- name: Upload coverage | |
# Don't upload coverage when using the `act` tool to run the workflow locally | |
if: ${{ !env.ACT }} | |
uses: codecov/codecov-action@v4 |