-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.28 KB
/
analysis.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
name: Code analysis
on: [push, pull_request]
defaults:
run:
shell: bash
working-directory: ./backend
jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
# golangci-lint working directory, default is project root
working-directory: backend
golangci-matrix:
name: staticheck
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest" ]
go: ["1.20.x", "1.21.x"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true
cache-dependency-path: '**/*.sum'
id: go
- uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: ${{ matrix.go }}
- uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2023.1.3"
install-go: false
cache-key: ${{ matrix.go }}
working-directory: backend