-
Notifications
You must be signed in to change notification settings - Fork 2
137 lines (111 loc) · 3.85 KB
/
Copy pathci.yml
File metadata and controls
137 lines (111 loc) · 3.85 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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.x"
- name: Run pre-commit hooks
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit==4.5.1
pre-commit run --all-files --show-diff-on-failure
test:
name: Go tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- name: Run tests
run: go test ./...
coverage:
name: Go coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- name: Generate coverage
run: go test -coverprofile=coverage.out ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: go
name: go-coverage
fail_ci_if_error: true
- name: Upload coverage artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage
path: coverage.out
if-no-files-found: error
build:
name: Go build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- name: Build commands
run: go build ./cmd/...
helm:
name: Helm validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Helm
uses: ./.github/actions/setup-helm
- name: Build chart dependencies
run: |
helm dependency build charts/ext-authz-token-exchange
helm dependency build charts/keycloak
- name: Lint production chart
run: helm lint charts/ext-authz-token-exchange
- name: Lint e2e chart
run: helm lint charts/ext-authz-token-exchange-e2e
- name: Lint Keycloak chart
run: helm lint charts/keycloak
- name: Render manifests
run: |
mkdir -p artifacts/manifests
helm template ext-authz-token-exchange charts/ext-authz-token-exchange \
--namespace ext-authz-token-exchange \
> artifacts/manifests/ext-authz-token-exchange.yaml
helm template ext-authz-token-exchange-e2e charts/ext-authz-token-exchange-e2e \
--namespace ext-authz-token-exchange-e2e \
> artifacts/manifests/ext-authz-token-exchange-e2e.yaml
- name: Verify GKE platform and app renders
run: ./scripts/verify-gke-deployment-model.sh
- name: Upload rendered manifests
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rendered-manifests
path: artifacts/manifests
if-no-files-found: error