This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
76 lines (74 loc) · 2.16 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: ci
on:
pull_request:
push:
branches:
- master
jobs:
unit-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: niden/actions-memcached@v7
- name: Restore Go cache
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Run tests
run: make test TEST_FLAGS="-race -tags integration -timeout 5m"
- name: Check codegen
run: make check-generated
- name: Build binaries
run: make all
- name: Prepare cache
run: |
cp "$(go env GOPATH)/bin/fluxctl" cache/fluxctl
docker save -o cache/flux-latest.tar fluxcd/flux:latest
- name: Upload cache
uses: actions/upload-artifact@v1
with:
name: cache
path: cache
e2e-testing:
runs-on: ubuntu-latest
needs: unit-testing
strategy:
matrix:
test: ['10_* 11_* 12_*', '13_* 14_*', '15_* 16_* 17_*', '20_* 21_* 22_*']
steps:
- uses: actions/checkout@v2
- uses: engineerd/[email protected]
with:
version: v0.11.1
image: kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047
- name: Restore Go cache
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Download cache
uses: actions/download-artifact@v1
with:
name: cache
- name: Load cache
run: |
chmod +x cache/fluxctl
sudo mv cache/fluxctl /usr/local/bin/fluxctl
docker load --input cache/flux-latest.tar -q
kind load docker-image fluxcd/flux:latest
- name: Run tests
run: |
E2E_TESTS='${{ matrix.test }}' make e2e-gh