forked from padok-team/burrito
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (77 loc) · 2.4 KB
/
Copy pathci.yaml
File metadata and controls
83 lines (77 loc) · 2.4 KB
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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- ".github/workflows/build-and-push.yaml"
- ".github/workflows/ci.yaml"
- "**.go"
- "go.mod"
- "go.sum"
- "Dockerfile"
- "internal/e2e/docker-compose.yml"
permissions:
packages: write
id-token: write # Required for Codecov and keyless cosign signing (build-and-push.yaml)
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Cache envtest binaries
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ./bin/
key: binaries
- name: Setup Golang
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: "go.mod"
- name: Install envtest
run: make envtest
- name: Setup envtest
run: ./bin/setup-envtest use
- name: Set up Docker Buildx for docker compose
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
- name: Run tests
run: make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
use_oidc: true
check-codegen:
name: Check Codegen
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Golang
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: "go.mod"
- name: Generate manifests
run: make manifests
- name: Check nothing has changed
run: |
git diff --exit-code ./manifests
lint-go:
name: Lint Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: latest
args: --issues-exit-code=0
build-and-push:
uses: ./.github/workflows/build-and-push.yaml