Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
name: Integration
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- release/*
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pre-test:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Finding files and store to output
|
|
id: set-matrix
|
|
run: echo "matrix=$({ cd integration && find . -type d ! -name testdata -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "stable"
|
|
|
|
- name: Download Go modules
|
|
run: go mod tidy
|
|
|
|
- name: Upload prepared workspace
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
retention-days: 1
|
|
|
|
integration:
|
|
name: test ${{ matrix.test-path }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
needs: pre-test
|
|
if: fromJSON(needs.pre-test.outputs.matrix)[0] != null
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
test-path: ${{ fromJson(needs.pre-test.outputs.matrix) }}
|
|
steps:
|
|
- name: Download prepared workspace
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "stable"
|
|
|
|
- name: Run Integration Tests
|
|
env:
|
|
GOTOOLCHAIN: local+path
|
|
GOSUMDB: off
|
|
run: go test -v -timeout 120m ./integration/${{ matrix.test-path }}
|
|
|
|
status:
|
|
runs-on: ubuntu-latest
|
|
needs: integration
|
|
if: always()
|
|
steps:
|
|
- name: Update result status
|
|
run: |
|
|
if [ "${{ needs.integration.result }}" = "failure" ]; then
|
|
exit 1
|
|
else
|
|
exit 0
|
|
fi
|