-
Notifications
You must be signed in to change notification settings - Fork 17
98 lines (83 loc) · 2.85 KB
/
ci.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
92
93
94
95
96
97
98
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: True
jobs:
test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.8"
channel-priority: "strict"
envfile: "environment.yml"
- os: ubuntu-latest
python-version: "3.9"
channel-priority: "strict"
envfile: "environment.yml"
- os: macos-latest
python-version: "3.9"
channel-priority: "strict"
envfile: "environment.yml"
- os: windows-latest
python-version: "3.9"
channel-priority: "strict"
envfile: "environment.yml"
- os: ubuntu-latest
python-version: "3.10"
channel-priority: "strict"
envfile: "environment.yml"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 1
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }}
- name: Install Conda environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
add-pip-as-python-dependency: true
auto-activate-base: false
activate-environment: test
channel-priority: ${{ matrix.channel-priority }}
environment-file: ${{ matrix.envfile }}
use-only-tar-bz2: true
- name: Conda info
shell: bash -l {0}
run: |
conda info -a
conda list
- name: Install musicaiz
shell: bash -l {0}
run: python -m pip install --upgrade-strategy only-if-needed -e .[tests]
- name: Run pytest
shell: bash -l {0}
run: pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
directory: ./coverage/reports/
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
verbose: true