-
Notifications
You must be signed in to change notification settings - Fork 198
91 lines (75 loc) · 2.01 KB
/
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
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: Test workflows
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 5 * * TUE"
# Cancel any in-progress runs when a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CACHE_NUMBER: 0 # Change this value to manually reset the environment cache
jobs:
run-tests:
name: OS
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos] #, windows]
include:
- os: ubuntu
env_file: envs/linux-pinned.yaml
- os: macos
env_file: envs/macos-pinned.yaml
# - os: windows
# env_file: envs/windows-pinned.yaml
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '1.5.9-1'
environment-file: ${{ matrix.env_file }}
log-level: debug
init-shell: bash
cache-environment: true
cache-downloads: true
- name: Set cache dates
run: |
echo "WEEK=$(date +'%Y%U')" >> $GITHUB_ENV
- name: Cache data and cutouts folders
uses: actions/cache@v4
with:
path: |
data
cutouts
key: data-cutouts-${{ env.WEEK }}-${{ env.CACHE_NUMBER }}
- name: Micromamba list
run: micromamba list
- name: Run Test
run: make test
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: results-${{ matrix.os }}
path: |
logs
.snakemake/log
results
retention-days: 3
# - name: Test plotting and summaries
# run: |
# snakemake --cores all plot_all_p_nom
# snakemake --cores all plot_all_summaries
# snakemake --cores all make_all_summaries
# rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results