Skip to content

Weekly cron

Weekly cron #82

Workflow file for this run

name: Weekly cron
on:
schedule:
# Weekly Monday 6AM build
- cron: "0 0 * * 1"
pull_request:
# We also want this workflow triggered if the `Weekly CI` label is
# added or present when PR is updated
types:
- synchronize
- labeled
workflow_dispatch:
jobs:
data:
if: (github.repository == 'spacetelescope/romanisim' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI')))
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: |
- macos: py39-xdist
- macos: py310-xdist
- linux: py3-devdeps-xdist