-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 1.92 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
78
79
80
81
82
name: Run test and non-trunk build
on:
push:
branches:
- '*'
- '!main'
permissions:
id-token: write
contents: read
jobs:
run:
name: Run tests
runs-on: [k8s-public]
timeout-minutes: 10
container: golang:1
env:
GOFLAGS: "-buildvcs=false"
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint/test
run: |
make test
build-controller:
runs-on: "ubuntu-latest"
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Build Docker Container
run: |
docker build -t test .
build-ca-gen:
runs-on: "ubuntu-latest"
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Build Docker Container
run: |
docker build -t test ./chiaca-generator/
test-controller-gen-ran:
runs-on: "ubuntu-latest"
timeout-minutes: 10
container: golang:1
steps:
- uses: actions/checkout@v4
- name: Check for git diffs
shell: bash
run: |
git config --global --add safe.directory /__w/chia-operator/chia-operator
git diff
- name: Make manifests
run: make manifests
- name: Check for git diffs
shell: bash
run: |
git config --global --add safe.directory /__w/chia-operator/chia-operator
git diff
diff=$(git diff-index HEAD --)
dirs=(api config hack internal)
for dir in "${dirs[@]}"; do
if [[ "$diff" != *"${dir}"* ]]; then
echo "No uncommitted changes in .${dir}/"
else
echo "Uncommitted changes found .${dir}/ -- This may indicate that you made changes to the controller API but did not run \"make manifests\" before committing. Please see DEVELOPMENT.md"
echo "${diff}"
exit 1
fi
done