-
Notifications
You must be signed in to change notification settings - Fork 15
82 lines (79 loc) · 3.05 KB
/
ci.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
name: CI
on:
push:
branches:
- main
- '*.x'
tags:
- '*'
pull_request:
branches:
- main
schedule:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: check-style
- linux: build-dist
data:
name: Download data
runs-on: ubuntu-latest
outputs:
path: ${{ steps.data.outputs.path }}
hash: ${{ steps.data_hash.outputs.hash }}
webbpsf_path: ${{ steps.webbpsf_path.outputs.path }}
galsim_cat_path: ${{ steps.galsim_cat_path.outputs.path }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: data
run: |
echo "webbpsf_url=https://stsci.box.com/shared/static/0ojjfg3cieqdpd18vl1bjnpe63r82dx8.gz" >> $GITHUB_OUTPUT
echo "galsim_url=https://github.com/GalSim-developers/GalSim/raw/releases/2.4/examples/data/" >> $GITHUB_OUTPUT
echo "path=/tmp/data" >> $GITHUB_OUTPUT
- run: |
mkdir ${{ steps.data.outputs.path }}
wget ${{ steps.data.outputs.webbpsf_url }} -O ${{ steps.data.outputs.path }}/minimal-webbpsf-data.tar.gz
cd ${{ steps.data.outputs.path }}
tar -xzvf minimal-webbpsf-data.tar.gz
mkdir galsim-data
wget ${{ steps.data.outputs.galsim_url }}/real_galaxy_catalog_23.5_example.fits -O galsim-data/real_galaxy_catalog_23.5_example.fits
wget ${{ steps.data.outputs.galsim_url }}/real_galaxy_catalog_23.5_example_selection.fits -O galsim-data/real_galaxy_catalog_23.5_example_selection.fits
wget ${{ steps.data.outputs.galsim_url }}/real_galaxy_catalog_23.5_example_fits.fits -O galsim-data/real_galaxy_catalog_23.5_example_fits.fits
- id: data_hash
run: echo "hash=${{ hashFiles( 'romanisim/data' ) }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.data.outputs.path }}
key: data-${{ steps.data_hash.outputs.hash }}
- id: webbpsf_path
run: echo "path=${{ steps.data.outputs.path }}/webbpsf-data" >> $GITHUB_OUTPUT
- id: galsim_cat_path
run: echo "path=${{ steps.data.outputs.path }}/galsim-data/real_galaxy_catalog_23.5_example.fits" >> $GITHUB_OUTPUT
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [ data ]
with:
setenv: |
WEBBPSF_PATH: ${{ needs.data.outputs.webbpsf_path }}
GALSIM_CAT_PATH: ${{ needs.data.outputs.galsim_cat_path }}
cache-path: ${{ needs.data.outputs.path }}
cache-key: data-${{ needs.data.outputs.hash }}
envs: |
- linux: py39-oldestdeps-cov-xdist
- linux: py39-xdist
- linux: py310-xdist
- linux: py3-xdist
- macos: py3-xdist
- linux: py3-pyargs-xdist
- linux: py3-cov-xdist
coverage: codecov