docs: fix two README typos #43
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" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
# The bake file defines several targets for the bats group using a matrix. | |
# We expand these and parametrise a GitHub Actions matrix with each value. | |
expand_bake_matrix: | |
name: Find the bakefile targets to run | |
runs-on: ubuntu-latest | |
outputs: | |
bats_targets: ${{ steps.expand_bake_matrix.outputs.bats_targets }} | |
tesh_targets: ${{ steps.expand_bake_matrix.outputs.tesh_targets }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 | |
- name: Expand bats matrix | |
id: expand_bake_matrix | |
run: | | |
docker buildx bake bats tesh --print \ | |
| jq -cer '{tesh: .group.tesh.targets, bats: .group.bats.targets} | |
| to_entries[] | |
| {name: .key, targets: .value} | |
| "\(.name)_targets=\(.targets | tojson)"' \ | |
| tee -a "${GITHUB_OUTPUT:?}" | |
bats_tests: | |
name: Bats tests | |
runs-on: ubuntu-latest | |
needs: | |
- expand_bake_matrix | |
strategy: | |
matrix: | |
target: ${{ fromJSON(needs.expand_bake_matrix.outputs.bats_targets) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 | |
- name: Run Bats Test Matrix | |
uses: docker/bake-action@f32f8b8d70bc284af19f8148dd14ad1d2fbc6c28 | |
with: | |
targets: ${{ matrix.target }} | |
files: docker-bake.hcl | |
set: | | |
*.cache-from=type=gha | |
*.cache-to=type=gha,mode=max | |
- name: Report Results | |
run: ./.github/workflows/report-results.sh | |
readme_examples: | |
name: README.md examples (run using Tesh to validate outputs) | |
runs-on: ubuntu-latest | |
needs: | |
- expand_bake_matrix | |
strategy: | |
matrix: | |
target: ${{ fromJSON(needs.expand_bake_matrix.outputs.tesh_targets) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 | |
- name: Run Bats Test Matrix | |
uses: docker/bake-action@f32f8b8d70bc284af19f8148dd14ad1d2fbc6c28 | |
with: | |
targets: ${{ matrix.target }} | |
files: docker-bake.hcl | |
set: | | |
*.cache-from=type=gha | |
*.cache-to=type=gha,mode=max | |
- name: Report Results | |
run: ./.github/workflows/report-results.sh |