-
Notifications
You must be signed in to change notification settings - Fork 454
46 lines (42 loc) · 1.38 KB
/
static-analysis.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
name: Static Code Analysis
on:
pull_request: { }
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
codegen:
name: Generated Code
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Prep Go Runner
uses: ./.github/actions/prep-go-runner
- name: Generate Code
run: |
./ci/check-generated-code.sh
static-analysis:
name: Lint Checks
runs-on: ubuntu-22.04
# The linter is intended to run quickly.
# We define a 10-minute timeout on the linter config (.golangci.yaml) as well.
# If we exceed this timeout, we should consider only running the linter on changed files.
timeout-minutes: 10
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Prep Go Runner
uses: ./.github/actions/prep-go-runner
- uses: golangci/golangci-lint-action@v6
# `make analyze` runs the linter with similar arguments to what we use here.
# If this action fails, try running `make analyze` locally.
with:
version: v1.57.2
args: --verbose --modules-download-mode=readonly --allow-parallel-runners
skip-cache: true
skip-save-cache: true
only-new-issues: false