Skip to content

address deprecation warnings in CI workflows #144

address deprecation warnings in CI workflows

address deprecation warnings in CI workflows #144

Workflow file for this run

name: test
on:
push:
paths:
- '**/*.ipynb'
- '**/*.yml'
- '**/*.yaml'
- '**/*.py'
pull_request:
paths:
- '**/*.ipynb'
- '**/*.yml'
- '**/*.yaml'
- '**/*.py'
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: build environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/conda_pkgs_dir
/usr/share/miniconda/envs/roman-data-workshop-env
key: conda-${{ runner.os }}-${{ hashFiles('00_install/environment.yml') }}-${{ github.sha }}
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: roman-data-workshop-env
environment-file: 00_install/environment.yml
use-only-tar-bz2: true
- run: python ./00_install/verify_install.py
- run: conda env export > roman-data-workshop-env-${{ github.sha }}.yml
- uses: actions/upload-artifact@v4
with:
name: roman-data-workshop-env-${{ github.sha }}.yml
path: roman-data-workshop-env-${{ github.sha }}.yml
data:
name: download data
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: data_cache
with:
path: data/
key: data-${{ hashFiles('data/download.py') }}
- uses: actions/cache@v4
with:
path: |
~/conda_pkgs_dir
/usr/share/miniconda/envs/roman-data-workshop-env
key: conda-${{ runner.os }}-${{ hashFiles('00_install/environment.yml') }}-${{ github.sha }}
if: steps.data_cache.outputs.cache-hit != 'true'
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: roman-data-workshop-env
environment-file: 00_install/environment.yml
use-only-tar-bz2: true
if: steps.data_cache.outputs.cache-hit != 'true'
- run: python data/download.py
if: steps.data_cache.outputs.cache-hit != 'true'
crds_contexts:
uses: spacetelescope/crds/.github/workflows/contexts.yml@master
test:
name: run notebooks
needs: [ build, data, crds_contexts ]
runs-on: ubuntu-latest
env:
CRDS_SERVER_URL: https://roman-crds.stsci.edu
CRDS_PATH: /tmp/data/crds_cache
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/conda_pkgs_dir
/usr/share/miniconda/envs/roman-data-workshop-env
key: conda-${{ runner.os }}-${{ hashFiles('00_install/environment.yml') }}-${{ github.sha }}
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: roman-data-workshop-env
environment-file: 00_install/environment.yml
use-only-tar-bz2: true
- uses: actions/cache@v4
with:
path: ${{ env.CRDS_PATH }}
key: crds-${{ needs.crds_contexts.outputs.roman }}
- run: crds sync --contexts ${{ needs.crds_contexts.outputs.roman }}
- uses: actions/cache@v4
with:
path: data/
key: data-${{ hashFiles('data/download.py') }}
- run: python data/download.py
- run: pip install nbcollection
- run: python -m nbcollection execute .