frostfs-api-go/.github/workflows/go.yml

65 lines
1.4 KiB
YAML
Raw Normal View History

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
jobs:
2019-11-21 09:50:27 +00:00
test:
runs-on: ubuntu-20.04
2019-11-21 09:50:27 +00:00
strategy:
matrix:
go: [ '1.17.x', '1.18.x', '1.19.x' ]
2019-11-21 09:50:27 +00:00
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
2019-11-21 09:50:27 +00:00
- name: Check out code
uses: actions/checkout@v3
2019-11-21 09:50:27 +00:00
- 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 }}-
2020-03-16 15:43:48 +00:00
- name: Get dependencies
run: make dep
2019-11-21 09:50:27 +00:00
- name: Run go test
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
2019-11-21 09:50:27 +00:00
- name: Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)
lint:
runs-on: ubuntu-20.04
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Check out code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.48.0
only-new-issues: true