-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (59 loc) · 1.74 KB
/
Copy pathpython-app.yml
File metadata and controls
75 lines (59 loc) · 1.74 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
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Install OpenMPI
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: openmpi-bin openmpi-common libopenmpi-dev
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{matrix.python-version}}
cache: 'pip'
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest pooch pandas
pip install .
- name: Make Trident folder
run: mkdir -p ~/.trident/
- name: Cache Trident data
id: cache-table
uses: actions/cache@v5
with:
path: ~/.trident/
key: ${{ runner.os }}-ion-table
- name: Configure Trident
if: steps.cache-table.outputs.cache-hit != 'true'
run: |
wget http://trident-project.org/data/ion_table/hm2012_ss_hr.h5.gz
gunzip hm2012_ss_hr.h5.gz
mv hm2012_ss_hr.h5 ~/.trident/
cp .github/scripts/config.tri ~/.trident/
ls ~/.trident
- name: Cache yt data
id: cache-datasets
uses: actions/cache@v5
with:
path: ./tests/data/
key: ${{ runner.os }}-datasets
# if cache misses, data will be downloaded during the pytest step
- name: Configure yt data dir
run: yt config set --local yt test_data_dir ./tests/data/
- name: Run pytest
run: pytest