.github/workflows/integration.yml #52
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
on: | |
workflow_call: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-integration | |
cancel-in-progress: true | |
name: Integration | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.extract-tests.outputs.matrix }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
- name: Extract test cases | |
id: extract-tests | |
run: | | |
# shellcheck disable=SC2046 | |
echo "matrix={\"test\":$(jq -c -n '$ARGS.positional' --args $(grep '^func Test' integration/*_test.go | awk '{print $2}' | cut -d'(' -f1))}" >> "$GITHUB_OUTPUT" | |
integration: | |
needs: prepare | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.prepare.outputs.matrix)}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
with: | |
cache: true | |
- name: Build Cache | |
uses: ./.github/actions/build-cache | |
- name: Docker Compose | |
run: docker compose up -d --wait | |
- name: Download Go Modules | |
run: go mod download | |
- name: Run ${{ matrix.test }} | |
run: go test -v -tags integration -run ${{ matrix.test }} ./integration |