2024-01-09 16:00:07 +00:00
|
|
|
name: Test Integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2024-07-29 13:58:04 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '**.md'
|
|
|
|
- 'script/gcg/**'
|
2024-01-09 16:00:07 +00:00
|
|
|
|
|
|
|
env:
|
2024-08-28 13:00:06 +00:00
|
|
|
GO_VERSION: '1.23'
|
2024-01-09 16:00:07 +00:00
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
2024-04-22 15:04:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-09 16:00:07 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go ${{ env.GO_VERSION }}
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
|
|
|
|
- name: Avoid generating webui
|
|
|
|
run: touch webui/static/index.html
|
|
|
|
|
|
|
|
- name: Build binary
|
|
|
|
run: make binary
|
|
|
|
|
|
|
|
test-integration:
|
2024-04-22 15:04:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-09 16:00:07 +00:00
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
parallel: [12]
|
2024-06-05 14:58:05 +00:00
|
|
|
index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
2024-01-09 16:00:07 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go ${{ env.GO_VERSION }}
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
|
|
|
|
- name: Avoid generating webui
|
|
|
|
run: touch webui/static/index.html
|
|
|
|
|
|
|
|
- name: Build binary
|
|
|
|
run: make binary
|
|
|
|
|
|
|
|
- name: Generate go test Slice
|
|
|
|
id: test_split
|
2024-07-29 13:58:04 +00:00
|
|
|
uses: hashicorp-forge/go-test-split-action@v2.0.0
|
2024-01-09 16:00:07 +00:00
|
|
|
with:
|
|
|
|
packages: ./integration
|
|
|
|
total: ${{ matrix.parallel }}
|
|
|
|
index: ${{ matrix.index }}
|
|
|
|
|
|
|
|
- name: Run Integration tests
|
|
|
|
run: |
|
2024-01-17 10:12:05 +00:00
|
|
|
TESTS=$(echo "${{ steps.test_split.outputs.run}}" | sed 's/\$/\$\$/g')
|
|
|
|
TESTFLAGS="-run \"${TESTS}\"" make test-integration
|