-
Notifications
You must be signed in to change notification settings - Fork 83
75 lines (63 loc) · 2.17 KB
/
test_full.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
name: Full test suite
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
run_tests:
runs-on: ${{ matrix.os }}
if: |
!contains(github.event.head_commit.message, '+ONLYDOCS') &&
!contains(github.event.head_commit.message, '+NOFULLTEST')
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/test
- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/test
- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\test
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: conda-incubator/[email protected]
with:
activate-environment: test${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ${{ matrix.prefix }}${{ matrix.python-version }}
key: ${{ matrix.label }}-conda-py${{ matrix.python-version }}-${{ hashFiles('.github/environment.yml') }}-${{ steps.date.outputs.date }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 1
id: cache
- name: Update environment
run: conda env update -n test${{ matrix.python-version }} -f .github/environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: print package info
shell: bash -l {0}
run: |
conda info -a
conda list
- name: Install MSNoise
shell: bash -l {0}
run: |
pip install -e .
- name: Test suite
shell: bash -l {0}
run: |
pytest -s --cov msnoise msnoise/test/tests.py --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}