Test Setup Jrsonnet #44
Workflow file for this run
This file contains 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: Test Setup Jrsonnet | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- actions/setup-jrsonnet/** | |
- .github/workflows/test-setup-jrsonnet.yml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- actions/setup-jrsonnet/** | |
- .github/workflows/test-setup-jrsonnet.yml | |
types: | |
- edited | |
- opened | |
- ready_for_review | |
- synchronize | |
merge_group: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
setup-jrsonnet: | |
runs-on: ubuntu-latest | |
env: | |
# generate a unique cache prefix for each test run, so we can test cache behaviour | |
CACHE_PREFIX: jrsonnet-${{ github.run_id }}-${{ github.run_attempt }} | |
strategy: | |
matrix: | |
cache-hit: [false, true] | |
max-parallel: 1 | |
name: "Setup Jrsonnet (cache hit: ${{ matrix.cache-hit }})" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
sparse-checkout: | | |
actions/setup-jrsonnet | |
- name: "Setup Jrsonnet (cache: ${{ matrix.cache-hit }})" | |
id: setup-jrsonnet | |
uses: ./actions/setup-jrsonnet | |
with: | |
cache-prefix: ${{ env.CACHE_PREFIX }} | |
version: 0.5.0-pre96-test | |
- name: Assert cache | |
if: fromJson(steps.setup-jrsonnet.outputs.cache-hit) != matrix.cache-hit | |
run: | | |
echo "Expected cache hit: '${{ matrix.cache-hit }}' but got '${{ fromJson(steps.setup-jrsonnet.outputs.cache-hit) }}'" | |
exit 1 | |
- name: Check Jrsonnet CLI works | |
run: jrsonnet --version |