-
Notifications
You must be signed in to change notification settings - Fork 38
73 lines (63 loc) · 1.61 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
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.23'
- 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.22', '1.23' ]
exclude:
# Only the latest Go version MacOS.
- os: macos-14
go: '1.22'
# Exclude the latest Go version for Ubuntu as Coverage uses it.
- os: ubuntu-22.04
go: '1.23'
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:
name: Lint
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master