-
Notifications
You must be signed in to change notification settings - Fork 31
91 lines (76 loc) · 2.67 KB
/
unittests.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Continuous Integration
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '59 23 * * *'
jobs:
unittests:
name: CI (${{ matrix.os }}-${{ matrix.environment-file }})
runs-on: ${{ matrix.os }}
continue-on-error: true
timeout-minutes: 90
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
environment-file: [.ci/38.yml, .ci/39.yml, .ci/310.yml]
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: setup micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: 'latest'
mamba-version: "*"
channels: conda-forge
channel-priority: true
- name: install geosnap - bash
shell: bash -l {0}
run: pip install -e . --no-deps --force-reinstall
if: matrix.os != 'windows-latest'
- name: install geosnap - powershell
shell: powershell
run: pip install -e . --no-deps --force-reinstall
if: matrix.os == 'windows-latest'
- name: download data - bash
shell: bash -l {0}
run: python geosnap/tests/_dl_data.py
env:
COMBO_DATA: ${{ secrets.COMBO_DATA }}
if: matrix.os != 'windows-latest'
- name: download data - powershell
shell: powershell
run: python geosnap/tests/_dl_data.py
env:
COMBO_DATA: ${{ secrets.COMBO_DATA }}
if: matrix.os == 'windows-latest'
- name: run tests - bash
shell: bash -l {0}
run: pytest -v geosnap --cov=geosnap --cov-report=xml
env:
LTDB_SAMPLE: ${{ secrets.COMBO_DATA }} # check whether we can pull secrets
LTDB_FULL: ${{ secrets.COMBO_DATA }}
NCDB: ${{ secrets.COMBO_DATA }}
if: matrix.os != 'windows-latest'
- name: run tests - powershell
shell: powershell
run: pytest -v geosnap
env:
LTDB_SAMPLE: ${{ secrets.COMBO_DATA }} # check whether we can pull secrets
LTDB_FULL: ${{ secrets.COMBO_DATA }}
NCDB: ${{ secrets.COMBO_DATA }}
if: matrix.os == 'windows-latest'
- name: codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests # optional
name: geosnap-codecov
verbose: true
if: matrix.os != 'windows-latest'