-
Notifications
You must be signed in to change notification settings - Fork 38
84 lines (74 loc) · 1.88 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: neofs-node tests
on:
push:
branches:
- master
- support/**
paths-ignore:
- '*.md'
pull_request:
branches:
- master
- support/**
paths-ignore:
- '*.md'
jobs:
cover:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
go-version: '1.22'
- name: Check out code
uses: actions/checkout@v4
- name: Run go test
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # if something is wrong on uploading codecov results, then this job will fail
files: ./coverage.txt
slug: nspcc-dev/neofs-node
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
test:
runs-on: ubuntu-latest
name: Unit tests
strategy:
matrix:
os: [ubuntu-22.04, macos-14]
go: [ '1.20.x', '1.21.x', '1.22' ]
exclude:
# Only the latest Go version MacOS.
- os: macos-14
go: '1.20.x'
- os: macos-14
go: '1.21.x'
# Exclude the latest Go version for Ubuntu as Coverage uses it.
- os: ubuntu-22.04
go: '1.22'
steps:
- name: Setup go
uses: actions/setup-go@v5
with:
cache: true
go-version: ${{ matrix.go }}
- name: Check out code
uses: actions/checkout@v4
- name: Run go test
run: go test -race ./...
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout=5m