-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (47 loc) · 1.05 KB
/
lint_go.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: Lint (Go)
# todo remove v3.x beafore merge to main
on:
pull_request:
branches:
- main
- v3.x
paths-ignore:
- 'smart-contracts/**'
- '**.md'
push:
branches:
- main
paths-ignore:
- 'smart-contracts/**'
- '**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
# This workflow makes x86_64 binaries for linux.
# TODO: add darwin later
jobs:
lint-go:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get git diff
uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
Makefile
- name: Setup Golang
if: env.GIT_DIFF
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Display go version
if: env.GIT_DIFF
run: go version
- name: Go lint
if: env.GIT_DIFF
run: make lint