This repository has been archived by the owner on Dec 27, 2024. It is now read-only.
neofs-api-go tests #1118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: neofs-api-go 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.20', '1.21', '1.22' ] | |
steps: | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Cache go mod | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go }}- | |
- name: Get dependencies | |
run: make dep | |
- 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: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest |