Skip to content

Commit

Permalink
set desired CRDS context from input
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Oct 28, 2022
1 parent d341ff9 commit 268228f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:
schedule:
# Weekly Monday 9AM build
- cron: "0 9 * * 1"
workflow_dispatch:
inputs:
crds_context:
type: string
description: CRDS context(s) to use with tests (defaults to operational context)
required: false

env:
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
Expand Down Expand Up @@ -61,6 +67,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: github.event.inputs.crds_context == ''
- run: echo "CRDS_CONTEXT=${{ github.event.inputs.crds_context }}" >> $GITHUB_ENV
if: github.event.inputs.crds_context != ''
- run: crds sync --contexts ${{ env.CRDS_CONTEXT }}
- uses: actions/cache@v3
with:
path: ${{ env.CRDS_PATH }}
Expand All @@ -84,6 +95,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: github.event.inputs.crds_context == ''
- run: echo "CRDS_CONTEXT=${{ github.event.inputs.crds_context }}" >> $GITHUB_ENV
if: github.event.inputs.crds_context != ''
- run: crds sync --contexts ${{ env.CRDS_CONTEXT }}
- uses: actions/cache@v3
with:
path: ${{ env.CRDS_PATH }}
Expand Down Expand Up @@ -112,6 +128,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: github.event.inputs.crds_context == ''
- run: echo "CRDS_CONTEXT=${{ github.event.inputs.crds_context }}" >> $GITHUB_ENV
if: github.event.inputs.crds_context != ''
- run: crds sync --contexts ${{ env.CRDS_CONTEXT }}
- uses: actions/cache@v3
with:
path: ${{ env.CRDS_PATH }}
Expand Down

0 comments on commit 268228f

Please sign in to comment.