2022-12-23 17:35:35 +00:00
|
|
|
name: frostfs-node tests
|
2020-10-16 12:51:39 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-11-02 09:48:58 +00:00
|
|
|
- support/**
|
2020-10-16 12:51:39 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-11-02 09:48:58 +00:00
|
|
|
- support/**
|
2020-10-16 12:51:39 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-15 16:28:30 +00:00
|
|
|
go: [ '1.17.x', '1.18.x', '1.19.x' ]
|
2020-10-16 12:51:39 +00:00
|
|
|
steps:
|
|
|
|
- name: Setup go
|
2022-08-15 16:44:15 +00:00
|
|
|
uses: actions/setup-go@v3
|
2020-10-16 12:51:39 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
|
|
|
|
- name: Check out code
|
2022-08-15 16:44:15 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-10-16 12:51:39 +00:00
|
|
|
|
|
|
|
- name: Cache go mod
|
2022-08-15 16:44:15 +00:00
|
|
|
uses: actions/cache@v3
|
2020-10-16 12:51:39 +00:00
|
|
|
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:
|
2022-08-15 07:48:57 +00:00
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: 1.19
|
|
|
|
- uses: actions/checkout@v3
|
2020-10-16 12:51:39 +00:00
|
|
|
- name: golangci-lint
|
2022-08-15 07:48:57 +00:00
|
|
|
uses: golangci/golangci-lint-action@v3
|
2020-10-16 12:51:39 +00:00
|
|
|
with:
|
2022-10-17 12:45:12 +00:00
|
|
|
version: v1.50.0
|
2020-11-18 16:27:05 +00:00
|
|
|
args: --timeout=5m
|
2020-10-16 12:51:39 +00:00
|
|
|
only-new-issues: true
|