-
Notifications
You must be signed in to change notification settings - Fork 109
46 lines (39 loc) · 1.21 KB
/
unit_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
jobs:
test:
name: "Unit test (Python ${{ matrix.python-version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"] #NOTE: min and max Python versions supported by icepyx
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: "./.github/actions/install-icepyx"
with:
python-version: "${{ matrix.python-version }}"
- name: "Run tests"
env:
EARTHDATA_PASSWORD: "${{ secrets.EARTHDATA_PASSWORD }}"
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
NSIDC_LOGIN: "${{ secrets.EARTHDATA_PASSWORD }}" # remove this
run: |
pytest icepyx/unit --verbose --cov app
- name: "Upload coverage report"
uses: "codecov/[email protected]"
with:
token: "${{ secrets.CODECOV_TOKEN }}"