-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.75 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
name: build
on: [ push, pull_request ]
jobs:
golangci:
name: lint
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/nodemon'
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.23
uses: actions/setup-go@v5.1.0
with:
go-version: 1.23.x
check-latest: true
cache: false # don't save & restore build caches because golangci-lint action does it internally
- name: Get dependencies
run: go mod vendor
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -c .golangci.yml
build:
name: ubuntu
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/nodemon'
steps:
- uses: actions/checkout@v4
- name: Set up Go 1.23
uses: actions/setup-go@v5.1.0
with:
go-version: 1.23.x
check-latest: true
cache: true
- name: Set up GolangCI-Lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.61.0
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get dependencies
run: make vendor
- name: Build
run: export PATH="$HOME/bin:$PATH"; make all
- name: Test with race detector
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...