diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f87919f5..539c095c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,77 +16,44 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + DATA_PATH: /tmp/data + jobs: check: - name: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: envs: | - linux: check-style - linux: check-security test: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: envs: | - - linux: test - python-version: 3.9 - - linux: test-numpy125 - python-version: 3.9 - - linux: test-numpy123 - python-version: 3.9 - - linux: test - python-version: 3.10 - - linux: test-numpy125 - python-version: 3.10 - - linux: test-numpy123 - python-version: 3.10 - - linux: test - python-version: 3.11 + - linux: py310 + - linux: py310-numpy123 + - linux: py310-numpy125 + - linux: py311 pytest-results-summary: true - - macos: test - python-version: 3.11 + - macos: py311 pytest-results-summary: true - - linux: test-dev - - linux: test-pyargs - python-version: 3.11 - - linux: test-cov - python-version: 3.11 + - linux: py311-pyargs + - linux: py311-cov coverage: codecov pytest-results-summary: true - crds: - name: retrieve current CRDS context - runs-on: ubuntu-latest - env: - OBSERVATORY: jwst - CRDS_PATH: /tmp/crds_cache - CRDS_SERVER_URL: https://jwst-crds.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 }} + - linux: py3-dev + crds_contexts: + uses: spacetelescope/crds/.github/workflows/contexts.yml@master test_downstream: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main - needs: [ crds ] + needs: [ crds_contexts ] with: setenv: | - CRDS_PATH: ${{ needs.crds.outputs.path }} - CRDS_SERVER_URL: ${{ needs.crds.outputs.server }} + CRDS_PATH: ${{ env.DATA_PATH }}/crds + CRDS_SERVER_URL: https://jwst-crds.stsci.edu CRDS_CLIENT_RETRY_COUNT: 3 CRDS_CLIENT_RETRY_DELAY_SECONDS: 20 - cache-path: ${{ needs.crds.outputs.path }} - cache-key: crds-${{ needs.crds.outputs.context }} + cache-path: ${{ env.DATA_PATH }}/crds + cache-key: crds-${{ needs.crds_contexts.outputs.jwst }} envs: | - - linux: py310-test-jwst-cov-xdist + - linux: py311-test-jwst-cov-xdist diff --git a/tox.ini b/tox.ini index e24fdcc5..c1b112eb 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = check-{style,security,build} test{,-dev}{,-pyargs,-cov} - test-numpy{125,122} + test-numpy{123,125} build-{docs,dist} # tox environments are constructed with so-called 'factors' (or terms)