Skip to content

test on schedule

test on schedule #1

name: Weekly cron
on:
schedule:
# Weekly Monday 6AM build
- cron: "0 0 * * 1"
pull_request:
# We also want this workflow triggered if the `Weekly CI` label is
# added or present when PR is updated
types:
- synchronize
- labeled
push:
tags: "*"
workflow_dispatch:
jobs:
crds:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI')))
name: retrieve current CRDS context
runs-on: ubuntu-latest
env:
OBSERVATORY: roman
CRDS_PATH: /tmp/data
CRDS_SERVER_URL: https://roman-crds-test.stsci.edu
steps:
- id: context
run: >
echo "pmap=$(
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ |
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
)" >> $GITHUB_OUTPUT
# Get default CRDS_CONTEXT without installing crds client
# See https://hst-crds.stsci.edu/static/users_guide/web_services.html#generic-request
- id: path
run: echo "path=${{ env.CRDS_PATH }}" >> $GITHUB_OUTPUT
- id: server
run: echo "url=${{ env.CRDS_SERVER_URL }}" >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.pmap }}
path: ${{ steps.path.outputs.path }}
server: ${{ steps.server.outputs.url }}
test:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [ crds ]
with:
setenv: |
CRDS_PATH: ${{ needs.crds.outputs.path }}
CRDS_SERVER_URL: ${{ needs.crds.outputs.server }}
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: ${{ needs.crds.outputs.path }}
cache-key: crds-${{ needs.crds.outputs.context }}
envs: |
- linux: py39-devdeps
pytest-results-summary: true
- linux: py310-devdeps
pytest-results-summary: true
- linux: py311-devdeps
pytest-results-summary: true
- macos: py39-devdeps
pytest-results-summary: true
- macos: py310-devdeps
pytest-results-summary: true
- macos: py311-devdeps
pytest-results-summary: true
- macos: py39
pytest-results-summary: true
- macos: py310
pytest-results-summary: true
- linux: py39-pyargs
pytest-results-summary: true
- linux: py310-pyargs
pytest-results-summary: true
- linux: py311-pyargs
pytest-results-summary: true
- macos: py39-sdpdeps
pytest-results-summary: true