Unit test #662
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: "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@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.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 --cov app | |
| - name: "Upload coverage report" | |
| uses: "codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7" # v5.5.1 | |
| with: | |
| token: "${{ secrets.CODECOV_TOKEN }}" |