-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (104 loc) · 3.94 KB
/
test.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
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
115
116
117
118
119
120
121
122
123
124
125
126
---
name: Test
on:
push:
merge_group:
schedule:
- cron: 0 13 * * 1
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
cache: pip
python-version-file: .python-version
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
- name: Install artisatomic
run: |
python -m pip install -e .
- name: Cache CMFGEN atomic data
uses: actions/cache@v3
id: cache-cmfgendata
with:
path: atomic-data-hillier/atomic_data_15nov16.tar.xz
key: atomic-data-hillier/atomic_data_15nov16.tar.xz
- name: Download/extract CMFGEN atomic data
working-directory: atomic-data-hillier/
run: source ./setup_cmfgen_data.sh
- name: Test with pytest
run: pytest
tests:
strategy:
matrix:
testname: [cmfgen, jplt]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 45
name: test ${{ matrix.testname }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
cache: pip
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
- name: Install artisatomic
run: |
python -m pip install -e .
- name: Cache CMFGEN atomic data
uses: actions/cache@v3
id: cache-cmfgendata
with:
path: atomic-data-hillier/atomic_data_15nov16.tar.xz
key: atomic-data-hillier/atomic_data_15nov16.tar.xz
- name: Download/extract CMFGEN atomic data
working-directory: atomic-data-hillier/
run: source ./setup_cmfgen_data.sh
- name: Cache JPLT atomic data
if: matrix.testname == 'jplt'
uses: actions/cache@v3
id: cache-jpltdata
with:
path: atomic-data-tanaka-jplt/data_v1.1/**
key: atomic-data-tanaka-jplt/data_v1.1
- name: Download/extract JPLT atomic data
if: matrix.testname == 'jplt'
working-directory: atomic-data-tanaka-jplt/
run: source ./setup_jplt_data.sh
- name: Generate artis atomic data files
run: |
cp tests/${{ matrix.testname }}/artisatomicionhandlers.json .
makeartisatomicfiles -output_folder tests/${{ matrix.testname }}/output
- name: Checksum output files
working-directory: tests/${{ matrix.testname }}/output
run: |
cat compositiondata.txt
cat *.json
md5sum *.txt
md5sum -c ../checksums.txt
- name: tar and zip output files
if: always()
run: |
tar -cvzf artis_files_${{ matrix.testname }}.tar.gz tests/${{ matrix.testname }}/output/*
- name: Upload output files
if: always()
uses: actions/upload-artifact@v3
with:
name: artis_files_${{ matrix.testname }}.tar.gz
path: artis_files_${{ matrix.testname }}.tar.gz