Skip to content

Set version of linter in build #251

Set version of linter in build

Set version of linter in build #251

Workflow file for this run

name: Build
on:
push:
branches:
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: Install test runner
run: go install gotest.tools/gotestsum@latest
- name: Tests
run: |
gotestsum -f github-actions ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: Coverage
run: |
go test \
-coverprofile cover.out \
-covermode count \
-coverpkg ./... \
-shuffle on \
./...
- name: Report
run: go tool cover -func=cover.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install test runner
run: go install gotest.tools/gotestsum@latest
- name: Test
run: gotestsum -f github-actions ./...
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2