Bump actions/upload-artifact from 4.6.2 to 5.0.0 #314
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash -leo pipefail {0} | |
| env: | |
| PYSYN_CDBS: /tmp/trds | |
| jref: https://ssb.stsci.edu/trds_open/jref | |
| lref: https://ssb.stsci.edu/cdbs/lref | |
| CRDS_PATH: /tmp/crds_cache | |
| CRDS_CLIENT_RETRY_COUNT: 3 | |
| CRDS_CLIENT_RETRY_DELAY_SECONDS: 20 | |
| LD_LIBRARY_PATH: /usr/local/lib | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yaml | |
| crds-contexts: | |
| uses: spacetelescope/crds/.github/workflows/contexts.yml@main | |
| test_installed: | |
| needs: [ build, crds-contexts ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: [ acstools, asdf, ccdproc, costools, jwst, reftools, synphot, wfpc2tools ] | |
| # the macOS 13 runner is on Intel hardware | |
| runs-on: [ ubuntu-latest, macos-latest ] | |
| python-version: [ '3.11', '3.12', '3.13' ] | |
| include: | |
| - package: acstools | |
| test-extras: test | |
| pytest-args: --remote-data -v | |
| - package: asdf | |
| test-extras: tests | |
| pytest-args: --remote-data --durations=10 | |
| - package: ccdproc | |
| test-extras: test | |
| pytest-args: -W ignore | |
| - package: costools | |
| test-extras: test | |
| - package: jwst | |
| test-extras: test | |
| crds-observatory: jwst | |
| - package: reftools | |
| test-dependencies: test | |
| - package: synphot | |
| test-dependencies: test | |
| - package: wfpc2tools | |
| exclude: | |
| - runs-on: macos-latest | |
| python-version: '3.11' | |
| runs-on: ${{ matrix.runs-on }} | |
| name: "`pytest --pyargs ${{ matrix.package }} ${{ matrix.pytest-args }} -n auto --dist=loadscope` (${{ matrix.runs-on }}, py${{ matrix.python-version }})" | |
| steps: | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_OBSERVATORY=${{ matrix.crds-observatory }} >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_SERVER_URL=https://${{ matrix.crds-observatory }}-crds.stsci.edu >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_CONTEXT=${{ matrix.crds-observatory == 'hst' && needs.crds-contexts.outputs.hst || (matrix.crds-observatory == 'jwst' && needs.crds-contexts.outputs.jwst || (matrix.crds-observatory == 'roman' && needs.crds-contexts.outputs.roman || '')) }} >> $GITHUB_ENV | |
| - if: env.CRDS_CONTEXT != '' | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ env.CRDS_PATH }} | |
| key: crds-${{ matrix.package }}-${{ env.CRDS_CONTEXT }} | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 | |
| with: | |
| environment-name: stenv-${{ runner.os }}-py${{ matrix.python-version }} | |
| environment-file: environment.yaml | |
| condarc: | | |
| use_uv: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| cache-environment: true | |
| cache-environment-key: environment-${{ needs.build.outputs.date }} | |
| init-shell: bash | |
| generate-run-shell: false | |
| post-cleanup: none | |
| - if: matrix.test-extras != '' | |
| run: pip install ${{ matrix.package }}[${{ matrix.test-extras }}] | |
| - run: pip install pytest pytest-xdist ${{ matrix.test-dependencies }} | |
| - run: pip list | |
| - run: pytest --pyargs ${{ matrix.package }} ${{ matrix.pytest-args }} -n auto --dist=loadscope | |
| test_from_source: | |
| needs: [ build, crds-contexts ] | |
| strategy: | |
| matrix: | |
| package: [ calcos, drizzlepac, hstcal, stistools, stsynphot ] | |
| # the macOS 13 runner is on Intel hardware | |
| runs-on: [ ubuntu-latest, macos-latest ] | |
| python-version: [ '3.11', '3.12', '3.13' ] | |
| include: | |
| - package: calcos | |
| repository: spacetelescope/calcos | |
| test-extras: test | |
| pytest-args: --slow | |
| - package: drizzlepac | |
| repository: spacetelescope/drizzlepac | |
| test-extras: test | |
| - package: hstcal | |
| repository: spacetelescope/hstcal | |
| test-dependencies: >- | |
| crds | |
| ci_watson | |
| pytest-args: --slow | |
| test-directory: tests | |
| crds-observatory: hst | |
| - package: stistools | |
| repository: spacetelescope/stistools | |
| - package: stsynphot | |
| repository: spacetelescope/stsynphot_refactor | |
| test-extras: test | |
| exclude: | |
| - runs-on: macos-latest | |
| python-version: '3.11' | |
| fail-fast: false | |
| runs-on: ${{ matrix.runs-on }} | |
| name: "`pytest ${{ matrix.package }}/${{ matrix.test-directory }} ${{ matrix.pytest-args }} -n auto --dist=loadscope` (${{ matrix.runs-on }}, py${{ matrix.python-version }})" | |
| steps: | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_OBSERVATORY=${{ matrix.crds-observatory }} >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_SERVER_URL=${{ matrix.crds-observatory }}-crds.stsci.edu >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_CONTEXT=${{ matrix.crds-observatory == 'hst' && needs.crds-contexts.outputs.hst || matrix.crds-observatory == 'jwst' && needs.crds-contexts.outputs.jwst || matrix.crds-observatory == 'roman' && needs.crds-contexts.outputs.roman || '' }} >> $GITHUB_ENV | |
| - if: env.CRDS_CONTEXT != '' | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ env.CRDS_PATH }} | |
| key: crds-${{ matrix.package }}-${{ env.CRDS_CONTEXT }} | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: stenv | |
| - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 | |
| with: | |
| environment-name: stenv-${{ runner.os }}-py${{ matrix.python-version }} | |
| environment-file: stenv/environment.yaml | |
| condarc: | | |
| use_uv: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| cache-environment: true | |
| cache-environment-key: environment-${{ needs.build.outputs.date }} | |
| init-shell: bash | |
| generate-run-shell: false | |
| post-cleanup: none | |
| - run: echo "version=$(pip list | awk '$1 == "${{ matrix.package }}" {print $2}')" >> $GITHUB_OUTPUT | |
| id: package_version | |
| # TODO: figure out a better way to use package version when checking out a Git ref | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: ${{ matrix.package }} | |
| repository: ${{ matrix.repository }} | |
| ref: ${{ steps.package_version.outputs.version }} | |
| fetch-depth: 0 | |
| - if: matrix.test-extras != '' | |
| run: pip install .[${{ matrix.test-extras }}] | |
| working-directory: ${{ matrix.package }} | |
| - if: matrix.package != 'hstcal' | |
| run: pip install -e . | |
| working-directory: ${{ matrix.package }} | |
| - run: pip install pytest pytest-xdist ${{ matrix.test-dependencies }} | |
| - run: pip list | |
| - run: pytest ${{ matrix.test-directory }} ${{ matrix.pytest-args }} -n auto --dist=loadscope | |
| working-directory: ${{ matrix.package }} | |
| crds_test_cache: | |
| uses: spacetelescope/crds/.github/workflows/cache.yml@main | |
| test_crds_with_data: | |
| needs: [ build, crds_test_cache ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: [ crds ] | |
| # the macOS 13 runner is on Intel hardware | |
| runs-on: [ ubuntu-latest, macos-latest ] | |
| python-version: [ '3.11', '3.12', '3.13' ] | |
| include: | |
| - package: crds | |
| repository: spacetelescope/crds | |
| exclude: | |
| - runs-on: macos-latest | |
| python-version: '3.11' | |
| runs-on: ${{ matrix.runs-on }} | |
| name: "`crds` `./runtests --cover` (${{ matrix.runs-on }}, py${{ matrix.python-version }})" | |
| env: | |
| CRDS_PATH: /tmp/crds-cache-default-test | |
| CRDS_TEST_ROOT: /tmp | |
| CRDS_TESTING_CACHE: /tmp/crds-cache-test | |
| CRDS_SERVER_URL: https://hst-crds.stsci.edu | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: stenv | |
| - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 | |
| with: | |
| environment-name: stenv-${{ runner.os }}-py${{ matrix.python-version }} | |
| environment-file: stenv/environment.yaml | |
| condarc: | | |
| use_uv: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| cache-environment: true | |
| cache-environment-key: environment-${{ needs.build.outputs.date }} | |
| init-shell: bash | |
| generate-run-shell: false | |
| post-cleanup: none | |
| - run: micromamba install -y filelock requests | |
| - run: pip install parsely roman-datamodels git+https://github.com/spacetelescope/jwst | |
| - run: pip list | |
| - run: echo "version=$(pip list | awk '$1 == "${{ matrix.package }}" {print $2}')" >> $GITHUB_OUTPUT | |
| id: package_version | |
| # TODO: figure out a better way to use package version when checking out a Git ref | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: ${{ matrix.package }} | |
| repository: ${{ matrix.repository }} | |
| ref: ${{ steps.package_version.outputs.version }} | |
| fetch-depth: 0 | |
| - run: pip uninstall --yes crds && ./install && pip install .[submission,test,docs,synphot] | |
| working-directory: ${{ matrix.package }} | |
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: | | |
| ${{ needs.crds_test_cache.outputs.path }} | |
| ${{ needs.crds_test_cache.outputs.testing_cache }} | |
| key: ${{ needs.crds_test_cache.outputs.key }} | |
| - run: ./runtests --cover | |
| working-directory: ${{ matrix.package }} | |
| test_for_smoke: | |
| needs: [ build ] | |
| strategy: | |
| matrix: | |
| package: [ calcos, drizzlepac ] | |
| # the macOS 13 runner is on Intel hardware | |
| runs-on: [ ubuntu-latest, macos-latest ] | |
| python-version: [ '3.11', '3.12', '3.13' ] | |
| include: | |
| - package: calcos | |
| run: calcos la8n01qkq_rawtag_a.fits | |
| crds-observatory: hst | |
| jref: hst/references/hst | |
| - package: drizzlepac | |
| run: pytest tests/test_drizzlepac.py -n auto --dist=loadscope | |
| crds-observatory: hst | |
| jref: hst/references/hst | |
| exclude: | |
| - runs-on: macos-latest | |
| python-version: '3.11' | |
| fail-fast: false | |
| runs-on: ${{ matrix.runs-on }} | |
| name: "`${{ matrix.run }}` (${{ matrix.runs-on }}, py${{ matrix.python-version }})" | |
| env: | |
| jref: /tmp/crds_cache/${{ matrix.jref }} | |
| steps: | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_OBSERVATORY=${{ matrix.crds-observatory }} >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_SERVER_URL=${{ matrix.crds-observatory }}-crds.stsci.edu >> $GITHUB_ENV | |
| - if: matrix.crds-observatory != '' | |
| run: echo CRDS_CONTEXT=${{ matrix.crds-observatory == 'hst' && needs.crds-contexts.outputs.hst || (matrix.crds-observatory == 'jwst' && needs.crds-contexts.outputs.jwst || (matrix.crds-observatory == 'roman' && needs.crds-contexts.outputs.roman || '')) }} >> $GITHUB_ENV | |
| - if: env.CRDS_CONTEXT != '' | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ env.CRDS_PATH }} | |
| key: crds-${{ matrix.package }}-${{ env.CRDS_CONTEXT }} | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| lfs: true | |
| - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 | |
| with: | |
| environment-name: stenv-${{ runner.os }}-py${{ matrix.python-version }} | |
| environment-file: environment.yaml | |
| condarc: | | |
| use_uv: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| cache-environment: true | |
| cache-environment-key: environment-${{ needs.build.outputs.date }} | |
| init-shell: bash | |
| generate-run-shell: false | |
| post-cleanup: none | |
| - run: pip install pytest pytest-xdist | |
| - run: pip list | |
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: tests/data/ | |
| key: data-${{ hashFiles('tests/data/*') }} | |
| - run: ${{ matrix.run }} |