Repository navigation
114 lines (108 loc) · 3.3 KB
/
Copy pathmodel-tests.yml
File metadata and controls
114 lines (108 loc) · 3.3 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
name: Model tests
"on":
pull_request:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: '23 6 * * 1'
permissions:
contents: read
concurrency:
group: model-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contracts:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v7.0.1
- uses: astral-sh/setup-uv@v10.2.0
with:
version: '0.12.13'
enable-cache: true
- run: uv sync --locked
- name: Check test infrastructure formatting
run: |
uv run --locked ruff check scripts/model_ci.py tests
uv run --locked ruff format --check scripts/model_ci.py tests
- name: Run contract tests
run: uv run --locked pytest tests -q --junitxml=test-results.xml
- uses: actions/upload-artifact@v7.0.1
if: always()
with:
name: contract-results
path: test-results.xml
retention-days: 14
model:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v7.0.1
- uses: astral-sh/setup-uv@v10.2.0
with:
version: '0.12.13'
enable-cache: true
- run: uv sync --locked
- name: Run fixed households without Sharrow
run: >-
uv run --locked python scripts/model_ci.py
--sharrow off --output model/output_ci_off
- name: Require Sharrow and compare decoded results
run: >-
uv run --locked python scripts/model_ci.py
--sharrow require --output model/output_ci_sh
--compare-to model/output_ci_off
- name: Save diagnostics
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: model-report
path: |
model/output_ci_*/report/
model/output_ci_*/*.log
retention-days: 14
- name: Verify locked inputs were not modified
run: >-
git diff --exit-code -- pyproject.toml uv.lock model/configs
model/configs_mp model/configs_sh model/configs_explicit_chunk
model/data
broader:
if: >-
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: larger
args: --households 10000
- name: single-process
args: --single-process
steps:
- uses: actions/checkout@v7.0.1
- uses: astral-sh/setup-uv@v10.2.0
with:
version: '0.12.13'
enable-cache: true
- run: uv sync --locked
- name: Run without Sharrow
run: >-
uv run --locked python scripts/model_ci.py ${{ matrix.args }}
--sharrow off --output model/output_ci_off
- name: Require Sharrow and compare decoded results
run: >-
uv run --locked python scripts/model_ci.py ${{ matrix.args }}
--sharrow require --output model/output_ci_sh
--compare-to model/output_ci_off
- uses: actions/upload-artifact@v7.0.1
if: always()
with:
name: model-report-${{ matrix.name }}
path: |
model/output_ci_*/report/
model/output_ci_*/*.log
retention-days: 14