-
Notifications
You must be signed in to change notification settings - Fork 107
53 lines (46 loc) · 1.48 KB
/
integration_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
47
48
49
50
51
52
53
name: "Integration test"
# NOTE: We're just running the tests that require earthdata login here; we
# don't distinguish between unit and integration tests yet.
on:
push:
branches:
- "main" # Releases
- "development" # PR merges
pull_request:
branches:
- "main" # Release pull requests
pull_request_review:
types:
- "submitted"
paths:
- ".github/**"
- "icepyx/**/*.py"
- "pyproject.toml"
- "requirements*.txt"
jobs:
test:
name: "Integration test"
# Job is conditional:
# - Do not run on PRs from forks
# - Do not run on `pull_request_review` events unless the PR is approved.
if: "${{ !github.event.pull_request.head.repo.fork && (github.event.action != 'pull_request_review' || github.event.review.state == 'approved') }}"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: "./.github/actions/install-icepyx"
with:
python-version: "3.12"
- name: "Run tests"
env:
EARTHDATA_PASSWORD: "${{ secrets.EARTHDATA_PASSWORD }}"
NSIDC_LOGIN: "${{ secrets.EARTHDATA_PASSWORD }}"
run: |
pytest icepyx/ --verbose --cov app \
icepyx/tests/test_behind_NSIDC_API_login.py \
icepyx/tests/test_auth.py
- name: "Upload coverage report"
uses: "codecov/[email protected]"
with:
token: "${{ secrets.CODECOV_TOKEN }}"