-
Notifications
You must be signed in to change notification settings - Fork 23
69 lines (59 loc) · 1.59 KB
/
pr-tests.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
name: CI
on: [pull_request]
jobs:
validate:
name: Validate PR
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run unit tests
run: make test
- name: Run functionality tests
run: make test-functionality
- name: Run audit flags tests
run: make test-audit
statics:
name: Static Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1
- uses: pre-commit/[email protected]
test-build:
name: Test Image Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
container: ghcr.io/kedacore/keda-tools:1.23.3
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
lfs: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Go modules cache
uses: actions/cache@v4
with:
path: /go/pkg
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test build
run: make docker-build