-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (50 loc) · 1.44 KB
/
test.yaml
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
name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: pytest (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Install dependencies
shell: bash -l {0}
run: mamba install xarray dask numpy scipy scikit-learn pys2index pytest pytest-cov
- name: Build and install xoak
shell: bash -l {0}
run: |
python -m pip install . --no-deps -v
python -OO -c "import xoak"
- name: Run tests
shell: bash -l {0}
run: pytest . --verbose --color=yes
- name: Codecov
if: matrix.os == 'macos-latest' && matrix.python-version == '3.8'
uses: codecov/codecov-action@v1