-
Notifications
You must be signed in to change notification settings - Fork 23
66 lines (61 loc) · 1.92 KB
/
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
# Jobs defined in this file are responsible for things that do not require container image
# but still relevant to the codebase such as unit tests, linting etc
name: Pull Request
on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'tests/performance/**'
- 'OWNERS'
- 'CODEOWNERS'
- 'sec-scanners-config.yaml'
- './github/dependabot.yml'
- ".**"
branches:
- main
- 'release-**'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false # We need to disable caching here, since this is handled by the golangci-lint action
- name: golangci-lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 #v4.0.0
with:
version: 'latest'
args: --timeout=10m --verbose
run-unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Run tests
run: |
PULL_PULL_SHA=${{ github.event.pull_request.head.sha}} \
PULL_BASE_SHA=${{ github.event.pull_request.base.sha}} \
PULL_NUMBER=${{ github.event.number }} \
./tests/integration/scripts/code-coverage-guard.sh
run-unit-tests-experimental:
name: Run unit tests with experimental build tag
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Run tests
run: make test-experimental-tag