-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (45 loc) · 1.44 KB
/
lint.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
name: Lint
on:
workflow_dispatch:
pull_request:
permissions:
contents: read
env:
GOPRIVATE: "github.com/emerishq,github.com/allinbits"
jobs:
setup-matrix:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Setup matrix combinations
id: setup-matrix-combinations
run: |
MATRIX_PARAMS_COMBINATIONS="$(make versions-json)"
echo ::set-output name=matrix-combinations::{\"include\":$MATRIX_PARAMS_COMBINATIONS}
outputs:
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
golangci:
name: lint
runs-on: self-hosted
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Configure git for private modules
env:
GIT_TOKEN: ${{ secrets.TENDERBOT_GIT_TOKEN }}
run: git config --global url."https://git:${GIT_TOKEN}@github.com".insteadOf "https://github.com"
- name: Setup multisdk
run: make setup-${{ matrix.versions }}
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.45
args: --timeout 10m --build-tags sdk_${{ matrix.versions }}
github-token: ${{ secrets.TENDERBOT_GIT_TOKEN }}