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

60 lines
1.2 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.14.x', '1.15.x' ]
2019-11-21 09:50:27 +00:00
steps:
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
2019-11-21 09:50:27 +00:00
- name: Check out code
uses: actions/checkout@v2
2019-11-21 09:50:27 +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
- 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: Check out code
uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
only-new-issues: true