-
Notifications
You must be signed in to change notification settings - Fork 41
36 lines (30 loc) · 946 Bytes
/
pr.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
name: Pull Request Validation
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: "1.20"
jobs:
validate:
name: "Validate ${{ matrix.target }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["lint", "test-bootstrap", "test-controlplane", "test-common"]
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: "./go.mod"
go-version: "${{ env.GO_VERSION }}"
cache: true
- name: ${{ matrix.target }}
run: make ${{ matrix.target }}
- name: check there are no changes after re-generation
run: test -z "$(git status --porcelain)" || (echo 'Changes detected after running make build'; git status; git --no-pager diff; false)