-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (46 loc) · 1.68 KB
/
Copy pathtests.yml
File metadata and controls
53 lines (46 loc) · 1.68 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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows us to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
platform: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
activate-environment: true
# Cache EXOSIMS data (downloads + computed cache like completeness, star fluxes)
# Only invalidates when dependencies change (uv.lock hash)
- name: Cache EXOSIMS data
uses: actions/cache@v6
with:
path: ~/.EXOSIMS
key: exosims-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
exosims-${{ runner.os }}-
# Pre-download Forecaster parameters if not cached
- name: Pre-download Forecaster parameters
run: |
mkdir -p ~/.EXOSIMS/downloads
if [ ! -f ~/.EXOSIMS/downloads/fitting_parameters.h5 ]; then
curl -fsSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://raw.githubusercontent.com/dsavransky/forecaster/master/fitting_parameters.h5" \
-o ~/.EXOSIMS/downloads/fitting_parameters.h5 || echo "Download failed, EXOSIMS will retry"
fi
- name: Install nox
run: uv tool install nox
- name: Test with nox
run: uvx nox -s tests --python ${{ matrix.python-version }}