-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (48 loc) · 1.43 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
47
48
49
50
51
52
53
54
55
56
57
name: Unit Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
recipes-version: [
"pangeo-forge-recipes==0.10.4",
]
beam-version: [
"apache-beam==2.52.0",
]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v0'
- name: 'Setup minio + mc'
run: |
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin/minio
wget --quiet https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
mv mc /usr/local/bin/mc
minio --version
mc --version
- name: Install dependencies & our package
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
- name: Test with pytest
run: |
pytest -vvv -s --cov=pangeo_forge_runner tests/unit/ \
--recipes-version=${{ matrix.recipes-version }} \
--beam-version=${{ matrix.beam-version }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2