forked from stefanprodan/podinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.81 KB
/
Copy pathtest.yml
File metadata and controls
58 lines (54 loc) · 1.81 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
name: test
on:
pull_request:
push:
branches:
- 'master'
permissions:
contents: read
env:
HELM_VERSION: 4.2.4
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/runner-cleanup
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: 1.27.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Flux Schema CLI
uses: fluxcd/flux-schema/actions/setup@3c02b4fbed04797116e127ac4ed4fd5b654c2dc4 # v0.12.1
- name: Setup Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v${{ env.HELM_VERSION }}
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@bb0f07cc4f586e91d5076e63e632cab8398fef41 # v0.34.0
- name: Run unit tests
run: make test
- name: Validate Helm chart
run: |
helm lint ./charts/podinfo/
helm template ./charts/podinfo/ | flux-schema validate -s ecosystem --verbose
- name: Validate Kustomize overlay
run: |
kubectl kustomize ./kustomize/ | flux-schema validate -s ecosystem --verbose
- name: Verify CUE formatting
working-directory: ./timoni/podinfo
run: timoni fmt --diff
- name: Validate Timoni module
working-directory: ./timoni/podinfo
run: |
timoni mod vet .
timoni build podinfo . -f debug_values.cue | flux-schema validate -s ecosystem --verbose
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'run make test and commit changes'
exit 1
fi