13e818e2ca
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: neofs-node tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '*.md'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '*.md'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
go: [ '1.17.x', '1.18.x', '1.19.x' ]
|
|
steps:
|
|
- name: Setup go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Cache go mod
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-${{ matrix.go }}-
|
|
|
|
- name: Run go test
|
|
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
- name: Codecov
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
run: bash <(curl -s https://codecov.io/bash)
|
|
|
|
lint:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- uses: actions/checkout@v3
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.50.0
|
|
args: --timeout=5m
|
|
only-new-issues: true
|