Skip to content

get doctests running as part of test actions #743

get doctests running as part of test actions

get doctests running as part of test actions #743

Workflow file for this run

name: "Unit test"
# NOTE: We're just skipping the tests requiring earthdata login here; we don't
# distinguish yet between unit and integration tests.
on:
pull_request:
push:
branches:
- "main"
- "development"
workflow_run:
workflows: [Update UML diagrams]
types:
- completed
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: "unit-tests-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: "Unit test (Python ${{ matrix.python-version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.13"] #NOTE: min and max Python versions supported by icepyx
steps:
- uses: "actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3" # v6.0.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "${{ matrix.python-version }}"
- name: "Install package and test dependencies"
run: |
python -m pip install .
python -m pip install -r requirements-dev.txt
- name: "Run tests"
run: |
pytest icepyx/tests/unit --verbose --doctest-modules icepyx/core --cov app
- name: "Upload coverage report"
uses: "codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7" # v5.5.1
with:
token: "${{ secrets.CODECOV_TOKEN }}"