-
Notifications
You must be signed in to change notification settings - Fork 6
95 lines (91 loc) · 2.56 KB
/
check_mmu_transformations.yaml
File metadata and controls
95 lines (91 loc) · 2.56 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
name: tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel only PR intermediate builds
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Cache virtual environment
id: cache-venv
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}
- name: Install uv
run: python -m pip install --upgrade uv
- name: Create venv and install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
rm -rf .venv
uv venv .venv && uv pip install '.[dev]'
- name: Install dependencies if venv incomplete
if: steps.cache-venv.outputs.cache-hit == 'true'
run: |
rm -rf .venv
uv venv .venv && source .venv/bin/activate && uv pip install '.[dev]'
- name: run pytest
run: |
source .venv/bin/activate && python -m pytest tests/
check_transformations:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
catalog:
- btsbot
- desi
- des_y3_sne_ia
- foundation
- gaia
- gz10
- hsc
- sdss
- snls
- ps1_sne_ia
- tess
- vipers
- legacysurvey
- manga
- swift_sne_ia
- yse
# - jwst # this is just too huge for CI, tested locally
- plasticc
- cfa
- csp
- ssl_legacysurvey
- chandra
# todo: add more catalogs here once they're ready
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Restore virtual environment
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}
- name: Install uv
run: python -m pip install --upgrade uv
- name: Run transformation test for ${{ matrix.catalog }}
run: |
source .venv/bin/activate && python verify.py ${{ matrix.catalog }}