update notebooks and files for Build 17 #152
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: roman-data-workshop-env | |
| environment-file: 00_install/environment.yml | |
| - 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: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: roman-data-workshop-env | |
| environment-file: 00_install/environment.yml | |
| if: steps.data_cache.outputs.cache-hit != 'true' | |
| - run: python data/download.py | |
| if: steps.data_cache.outputs.cache-hit != 'true' | |
| test: | |
| name: run notebooks | |
| needs: [ build, data ] | |
| runs-on: ubuntu-latest | |
| env: | |
| CRDS_SERVER_URL: https://roman-crds-test.stsci.edu | |
| CRDS_PATH: ~/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: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: roman-data-workshop-env | |
| environment-file: 00_install/environment.yml | |
| - run: echo "::set-output name=crds_context::$(crds list --operational-context)" | |
| id: crds_context | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.CRDS_PATH }} | |
| key: crds-jwst-datamodels-${{ steps.crds_context.outputs.crds_context }} | |
| if: steps.crds_context.outputs.crds_context != '' | |
| - run: crds sync --contexts ${{ steps.crds_context.outputs.crds_context }} | |
| if: steps.crds_context.outputs.crds_context != '' | |
| - 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 . |