Skip to content

Commit

Permalink
add ability to specify CRDS context with workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Aug 3, 2022
1 parent 456a3c6 commit 6b1f27d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/roman_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ on:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
- 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://roman-crds-test.stsci.edu
Expand Down Expand Up @@ -92,6 +98,9 @@ jobs:
- run: pip install ".[test]" pytest-xdist
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand Down Expand Up @@ -122,6 +131,9 @@ jobs:
- run: pip install ".[test,all]" pytest-xdist
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand Down Expand Up @@ -153,6 +165,9 @@ jobs:
- run: pip install ".[test]" pytest-xdist
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand Down Expand Up @@ -186,6 +201,9 @@ jobs:
- run: pip install ".[test]" pytest-xdist
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand Down Expand Up @@ -226,6 +244,9 @@ jobs:
- run: pip install numpy==${{ matrix.numpy }}
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand All @@ -251,6 +272,9 @@ jobs:
- run: pip install ".[test]" pytest-xdist pytest-cov
- run: pip freeze
- 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 != ''
- uses: actions/[email protected]
if: env.CRDS_CONTEXT != ''
with:
Expand Down

0 comments on commit 6b1f27d

Please sign in to comment.