-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (120 loc) · 3.44 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
test:
name: Small test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@fd2089d1f56724d6456f24d58605e6964deae124 # v2.3.2
with:
aqua_version: v2.24.1
aqua_opts: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
cat > ./e2e/manifests/website/.ssh/id_rsa <<EOF
${{ secrets.DEPLOY_KEY }}
EOF
- run: chmod 0600 ./e2e/manifests/website/.ssh/id_rsa
- run: make test
e2e:
name: End-to-end Test
runs-on: ubuntu-22.04
strategy:
matrix:
k8s-version:
- v1.25.16 # renovate: kindest/node
- v1.26.14 # renovate: kindest/node
- v1.27.11 # renovate: kindest/node
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@fd2089d1f56724d6456f24d58605e6964deae124 # v2.3.2
with:
aqua_version: v2.24.1
aqua_opts: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
cat > ./e2e/manifests/website/.ssh/id_rsa <<EOF
${{ secrets.DEPLOY_KEY }}
EOF
- run: chmod 0600 ./e2e/manifests/website/.ssh/id_rsa
- run: make test KUBERNETES_VERSION=${{ matrix.k8s-version }}
id: run_e2e_test
working-directory: e2e
- if: failure() && steps.run_e2e_test.outcome == 'failure'
run: |
kubectl get pod
kubectl describe pod
check-e2e-test:
name: All e2e tests passed
runs-on: ubuntu-latest
needs: e2e
steps:
- run: echo ok
check-goreleaser-config:
name: Check goreleaser.yml
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: check -f .goreleaser.yml
tilt:
name: Run tilt ci
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@fd2089d1f56724d6456f24d58605e6964deae124 # v2.3.2
with:
aqua_version: v2.24.1
aqua_opts: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: make dev
- run: tilt ci
dry-run:
name: Dry-run release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@fd2089d1f56724d6456f24d58605e6964deae124 # v2.3.2
with:
aqua_version: v2.24.1
aqua_opts: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup tag for goreleaser
run: |
echo "GORELEASER_CURRENT_TAG=$(git describe --tags --abbrev=0 --match "v*" || echo v0.0.0)" >> $GITHUB_ENV
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: --snapshot --skip=publish --clean