Skip to content

Commit

Permalink
[CI] set default CRDS context to jwst-edit (#8987)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett authored Dec 12, 2024
1 parent 911335e commit 974682f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 69 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
type: string
required: false
default: ''
crds_server:
description: CRDS server
crds_server_url:
description: CRDS server URL
type: string
required: false
default: https://jwst-crds.stsci.edu
Expand All @@ -46,28 +46,18 @@ jobs:
envs: |
- linux: check-dependencies
- linux: check-types
latest_crds_contexts:
uses: ./.github/workflows/contexts.yml
crds_context:
needs: [ latest_crds_contexts ]
runs-on: ubuntu-latest
steps:
- id: context
run: echo context=${{ github.event_name == 'workflow_dispatch' && (inputs.crds_context != '' && inputs.crds_context || needs.latest_crds_contexts.outputs.jwst) || needs.latest_crds_contexts.outputs.jwst }} >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.context }}
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
needs: [ crds_context ]
with:
setenv: |
CRDS_PATH: /tmp/data/crds_cache
CRDS_SERVER_URL: ${{ github.event_name == 'workflow_dispatch' && inputs.crds_server || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ needs.crds_context.outputs.context }}
CRDS_SERVER_URL: ${{ inputs.crds_server_url || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ inputs.crds_context || 'jwst-edit' }}
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: /tmp/data/crds_cache
cache-key: crds-${{ needs.crds_context.outputs.context }}
cache-key: crds-${{ inputs.crds_context || 'jwst-edit' }}
envs: |
- linux: py310-oldestdeps-xdist-cov
pytest-results-summary: true
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
type: string
required: false
default: ''
crds_server:
description: CRDS server
crds_server_url:
description: CRDS server URL
type: string
required: false
default: https://jwst-crds.stsci.edu
Expand All @@ -22,25 +22,15 @@ concurrency:
cancel-in-progress: true

jobs:
latest_crds_contexts:
uses: ./.github/workflows/contexts.yml
crds_context:
needs: [ latest_crds_contexts ]
runs-on: ubuntu-latest
steps:
- id: context
run: echo context=${{ github.event_name == 'workflow_dispatch' && (inputs.crds_context != '' && inputs.crds_context || needs.latest_crds_contexts.outputs.jwst) || needs.latest_crds_contexts.outputs.jwst }} >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.context }}
test:
if: (github.repository == 'spacetelescope/jwst' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run scheduled tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
needs: [ crds_context ]
with:
setenv: |
CRDS_PATH: /tmp/crds_cache
CRDS_SERVER_URL: ${{ github.event_name == 'workflow_dispatch' && inputs.crds_server || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ needs.crds_context.outputs.context }}
CRDS_SERVER_URL: ${{ inputs.crds_server_url || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ inputs.crds_context || 'jwst-edit' }}
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: /tmp/crds_cache
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/contexts.yml

This file was deleted.

18 changes: 4 additions & 14 deletions .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
type: string
required: false
default: ''
crds_server:
description: CRDS server
crds_server_url:
description: CRDS server URL
type: string
required: false
default: https://jwst-crds.stsci.edu
Expand All @@ -31,25 +31,15 @@ concurrency:
cancel-in-progress: true

jobs:
latest_crds_contexts:
uses: ./.github/workflows/contexts.yml
crds_context:
needs: [ latest_crds_contexts ]
runs-on: ubuntu-latest
steps:
- id: context
run: echo context=${{ github.event_name == 'workflow_dispatch' && (inputs.crds_context != '' && inputs.crds_context || needs.latest_crds_contexts.outputs.jwst) || needs.latest_crds_contexts.outputs.jwst }} >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.context }}
test:
if: (github.repository == 'spacetelescope/jwst' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
needs: [ crds_context ]
with:
setenv: |
CRDS_PATH: /tmp/data/crds_cache
CRDS_SERVER_URL: ${{ github.event_name == 'workflow_dispatch' && inputs.crds_server || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ needs.crds_context.outputs.context }}
CRDS_SERVER_URL: ${{ inputs.crds_server_url || 'https://jwst-crds.stsci.edu' }}
CRDS_CONTEXT: ${{ inputs.crds_context || 'jwst-edit' }}
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: /tmp/data/crds_cache
Expand Down

0 comments on commit 974682f

Please sign in to comment.