generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (40 loc) · 1.2 KB
/
pr-checks.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
name: PR Checks
run-name: '${{github.event.pull_request.title}}'
'on':
- pull_request
env:
PIPELINE: true
jobs:
build:
strategy:
matrix:
gcpNfsVolumeAutomaticLocationAllocation:
- "false"
- "true"
nukeBackupsGcp:
- "false"
- "true"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Display Go version
run: go version
- name: Build and test
env:
FF_GCP_NFS_VOLUME_AUTOMATIC_LOCATION_ALLOCATION: ${{ matrix.gcpNfsVolumeAutomaticLocationAllocation }}
FF_NUKE_BAKCUPS_GCP: ${{ matrix.nukeBackupsGcp }}
run: |
./config/sync.sh
go mod tidy
go mod download
make build
make test
- name: Check modified files
run: git diff --exit-code
- name: Check if test GUIDs are unique
run: x=$(grep -rEho '[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}' ./internal | sort | uniq -d); [ -z "${x}" ] || ( echo duplicated GUID detected $x; exit 1; )