Skip to content

return a value for compare_asdf #2467

return a value for compare_asdf

return a value for compare_asdf #2467

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
- '*x'
tags:
- '*'
pull_request:
branches:
- main
schedule:
# Weekly Monday 9AM build
- cron: "0 9 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
data:
name: retrieve current CRDS context, and WebbPSF data
runs-on: ubuntu-latest
env:
OBSERVATORY: roman
CRDS_SERVER_URL: https://roman-crds-test.stsci.edu
CRDS_PATH: /tmp/data
outputs:
context: ${{ steps.context.outputs.pmap }}
path: ${{ steps.path.outputs.path }}
server: ${{ steps.server.outputs.url }}
hash: ${{ steps.data_hash.outputs.hash }}
webbpsf_path: ${{ steps.webbpsf_path.outputs.path }}
steps:
# crds:
- 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
# webbpsf:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: data
run: |
echo "webbpsf_url=https://stsci.box.com/shared/static/n1fealx9q0m6sdnass6wnyfikvxtc0zz.gz" >> $GITHUB_OUTPUT
echo "path=/tmp/data" >> $GITHUB_OUTPUT
- run: |
mkdir -p ${{ steps.data.outputs.path }}
wget ${{ steps.data.outputs.webbpsf_url }} -O ${{ steps.data.outputs.path }}/minimal-webbpsf-data.tar.gz
cd ${{ steps.data.outputs.path }}
tar -xzvf minimal-webbpsf-data.tar.gz
- id: data_hash
run: echo "hash=${{ steps.data.outputs.hash }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.data.outputs.path }}
key: data-${{ steps.data_hash.outputs.hash }}
- id: webbpsf_path
run: echo "path=${{ steps.data.outputs.path }}/webbpsf-data" >> $GITHUB_OUTPUT
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: check-dependencies
- linux: build-dist
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [ data ]
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
DD_SERVICE: romancal
DD_ENV: ci
DD_GIT_REPOSITORY_URL: ${{ github.repositoryUrl }}
DD_GIT_COMMIT_SHA: ${{ github.sha }}
DD_GIT_BRANCH: ${{ github.ref_name }}
WEBBPSF_PATH: ${{ needs.data.outputs.webbpsf_path }}
cache-path: ${{ needs.data.outputs.path }}
cache-key: data-${{ needs.data.outputs.hash }}
envs: |
- linux: py39-oldestdeps-cov
pytest-results-summary: true
- linux: py39
pytest-results-summary: true
- linux: py310
pytest-results-summary: true
- linux: py311-ddtrace
pytest-results-summary: true
- macos: py311-ddtrace
pytest-results-summary: true
- linux: py311-devdeps
pytest-results-summary: true
- linux: py311-cov
coverage: codecov
pytest-results-summary: true