-
Notifications
You must be signed in to change notification settings - Fork 764
77 lines (65 loc) · 2.01 KB
/
test.yml
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
---
name: Test
on:
workflow_call:
workflow_dispatch:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout master
run: git checkout master && git checkout - && git rev-parse HEAD
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Check if values schema is up-to-date
uses: losisin/helm-values-schema-json-action@v1
with:
input: traefik/values.yaml
output: traefik/values.schema.json
fail-on-diff: true
- name: Lint
run: make lint
- name: Test
run: make test
- name: Test if it's a release PR
id: check
run: |
set +e
changed=$(git diff --name-only -r HEAD^1 HEAD | grep Chart.yaml)
if [[ -n $changed ]] ; then
echo "release=true" >> "$GITHUB_OUTPUT"
fi
set -e
- name: Check docs
if: steps.check.outputs.release
run: |
set +e
make docs
changed=$(git status | grep VALUES.md)
if [[ -n $changed ]]; then
echo "Traefik values have changed. Run make docs"
git diff
exit 1
fi
set -e
exit 0
- name: Create kind cluster
if: steps.check.outputs.release
uses: helm/[email protected]
- name: Install LB on Kind
if: steps.check.outputs.release
run: |
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.11/config/manifests/metallb-native.yaml
kubectl wait --namespace metallb-system --for=condition=ready pod --selector=app=metallb --timeout=90s
kubectl apply -f hack/metallb-config.yaml
- name: Check install on Kind
if: steps.check.outputs.release
run: |
make test-install