-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 1.85 KB
/
check_pull_request.yaml
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
name: Check pull request
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
jobs:
run_tests:
name: "Run helm unit tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.11.1
- name: Install plugin
run: make ci/tests/unit/install-plugin
- name: Run unit tests
run: make ci/tests/unit
check_unit_tests_snapshots:
needs: [run_tests]
name: "Check unit tests snapshots were committed"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.11.1
- name: Run snapshot update
run: make ci/tests/unit/update-snapshot/run
- name: Process changes
run: |
if [[ -z "$(git status --porcelain)" ]];
then
exit 0
else
echo "You have uncommitted unit test snapshots:"
echo "Run 'make tests/unit/update-snapshot'"
echo "Commit changes and push"
exit 1
fi
check_documentation:
name: "Check documentation was rebuilt and committed"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19.x'
- name: Check documentation changes
run: make doc/diff