2020-09-21 18:17:49 +00:00
|
|
|
name: neofs-api-go tests
|
|
|
|
|
2020-03-16 15:43:48 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2019-11-21 09:50:27 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
jobs:
|
2019-11-21 09:50:27 +00:00
|
|
|
test:
|
2020-09-21 18:17:49 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2019-11-21 09:50:27 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-15 12:53:37 +00:00
|
|
|
go: [ '1.17.x', '1.18.x', '1.19.x' ]
|
2019-11-21 09:50:27 +00:00
|
|
|
steps:
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Setup go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
2019-11-21 09:50:27 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
2019-11-21 09:50:27 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Cache go mod
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-${{ matrix.go }}-
|
2020-03-16 15:43:48 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Get dependencies
|
|
|
|
run: make dep
|
2019-11-21 09:50:27 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Run go test
|
|
|
|
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
|
2019-11-21 09:50:27 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Codecov
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
run: bash <(curl -s https://codecov.io/bash)
|
2020-09-21 14:15:17 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-20.04
|
2020-09-21 14:15:17 +00:00
|
|
|
steps:
|
2020-09-21 18:17:49 +00:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
2020-09-21 14:15:17 +00:00
|
|
|
|
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-10-04 19:53:41 +00:00
|
|
|
version: v1.42.1
|
2020-09-21 14:15:17 +00:00
|
|
|
only-new-issues: true
|