Skip to content

Commit

Permalink
put if: at the beginning of block
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jan 30, 2023
1 parent cd337f6 commit 46c29f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'setup.cfg'
- run: >
- if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
run: >
echo "pmap=$(
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["jwst"], "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: crds-context
if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
- run: echo "CRDS CONTEXT ${{ steps.crds-context.outputs.pmap }}"
if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
- uses: actions/cache@v3
- if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
run: echo "CRDS CONTEXT ${{ steps.crds-context.outputs.pmap }}"
- if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
uses: actions/cache@v3
with:
path: ${{ env.CRDS_PATH }}
key: crds-${{ steps.crds-context.outputs.pmap }}
if: ${{ contains(matrix.toxenv, 'test') && !contains(matrix.toxenv, 'opencv') }}
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
- if: ${{ contains(matrix.toxenv, '-cov') }}
Expand Down

0 comments on commit 46c29f5

Please sign in to comment.