-
Notifications
You must be signed in to change notification settings - Fork 136
73 lines (71 loc) · 2.4 KB
/
go-integration.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Go End to End
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- gh-pages
jobs:
go-integration-tests:
if: github.repository_owner == 'armadaproject'
strategy:
fail-fast: false
matrix:
# WARN(JayF): If we begin attempting to support >1 golang version,
# we'll have to ensure that we don't use the same artifact name for
# both versions in the matrix -- this will lead to them overwriting
# each other.
go: [ '1.20' ]
# As of December 2022, using 8vcpu runners is slower overall,
# due to longer queue times.
runs-on: ubuntu-22.04
env:
# Cache Docker layers in the Github actions cache.
# These variables are picked up by the goreleaser config.
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
DOCKER_BUILDX_BUILDER: "builder"
# Seems that for optimal performance, we need to set these
# explicitly - including GOBIN.
GOCACHE: "/home/runner/.cache/go-build"
GOPATH: "/home/runner/go"
GOBIN: "/home/runner/go/bin"
steps:
- uses: actions/checkout@v3
- run: docker buildx create --name ${DOCKER_BUILDX_BUILDER} --driver docker-container --use
- run: docker buildx install
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: false
- name: Setup Golang caches
uses: actions/cache@v3
with:
path: |
/home/runner/.cache/go-build
/home/runner/go
/home/runner/go/bin
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Setup and integration tests
run: |
# Manually create folders to ensure perms are correct.
mkdir -p .kube/internal
mkdir -p .kube/external
go run github.com/magefile/mage@v1.14.0 -v localdev minimal testsuite
- name: Upload JUnit report artifact
uses: actions/upload-artifact@v3.1.1
with:
name: junit.xml
path: junit.xml
if-no-files-found: error
- name: Publish JUnit report
uses: mikepenz/action-junit-report@v3.6.1
if: always()
with:
report_paths: junit.xml
fail_on_failure: true
require_tests: true
detailed_summary: true