forked from reactive-tech/kubegres
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.46 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
tags: [ 'v[0-9]+.[0-9]+-tetrate-v[0-9]+' ] # v1.16-tetrate-v7
pull_request:
branches:
- main
- release-**
env:
GOPROXY: https://proxy.golang.org
jobs:
# All test running sequentially take around ~2h.
# Sppliting them in groups that take more or less the same time makes PR's readiness faster
test-group:
strategy:
matrix:
label:
- "group:1"
- "group:2"
- "group:3"
- "group:4"
- "group:5"
runs-on: ubuntu-latest
env:
PLATFORMS: linux/amd64
TEST_LABEL: ${{ matrix.label }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make test
# Have a fixed test to run once matrix tests are completed so we can make this required
test:
runs-on: ubuntu-latest
# We need this to run always to force-fail (and not skip) if any needed
# job has failed. Otherwise, a skipped job will not fail the workflow.
if: always()
steps:
- run: |
echo "tests completed"
[ "${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'skipped')
}}" == "false" ] || exit 1
needs:
- test-group