-
Notifications
You must be signed in to change notification settings - Fork 23
50 lines (45 loc) · 1.32 KB
/
code-quality.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
name: Code quality checks
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GOOS: linux
GO111MODULE: on
jobs:
resolve-modules:
name: Resolve Modules
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- id: set-matrix
run: ./utils/golangci-lint/resolve-modules.sh
golangci:
name: GolangCI Lint
needs: resolve-modules
runs-on: ubuntu-20.04
strategy:
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
fail-fast: false
env:
GOPRIVATE_KEY: ${{ secrets.XDT_REPO_ACCESS_KEY }}
GOPRIVATE: "github.com/ease-lab/vhive-xdt"
steps:
- name: Setup Go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code into go module directory
uses: actions/checkout@v3
- run: git config --global url."https://ease-lab:$(echo $GOPRIVATE_KEY)@github.com/ease-lab/vhive-xdt".insteadOf "https://github.com/ease-lab/vhive-xdt"
- name: Lint with golangci-lint
uses: golangci/[email protected]
with:
working-directory: ${{ matrix.workdir }}
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true