-
Notifications
You must be signed in to change notification settings - Fork 79
56 lines (46 loc) · 1.71 KB
/
test-model.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
name: test-model
on:
pull_request: null
workflow_dispatch:
schedule:
- cron: "10 8 * * *" # daily at 8:10 UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PY_COLORS: "1"
jobs:
test-model:
name: test-model
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v1
with:
environment-file: conda-lock.yml
environment-name: cf-scripts
condarc-file: autotick-bot/condarc
- name: configure conda, install code, and clone cf-graph
run: |
pip install --no-deps --no-build-isolation -e .
git clone --depth=1 https://github.com/regro/cf-graph-countyfair.git cf-graph
- name: conda info and env
run: |
echo "=================================================================="
echo "=================================================================="
conda info
echo ""
echo "=================================================================="
echo "=================================================================="
conda list
- name: run pytest (model)
run: |
cd cf-graph
# for pull requests, a failed model test should not be a failed check
# this is a hack around the absence of https://github.com/orgs/community/discussions/15452
pytest \
--durations 10 \
../tests/model ${{ github.event_name == 'pull_request' && '|| [ $? = 1 ]' || '' }}