Skip to content

Merge pull request #4 from PKuebler/dependabot/github_actions/actions… #11

Merge pull request #4 from PKuebler/dependabot/github_actions/actions…

Merge pull request #4 from PKuebler/dependabot/github_actions/actions… #11

Workflow file for this run

name: Go
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.18', '1.19', '1.20', '1.21', '1.x' ]
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./payloads/...
- name: Upload coverage reports to Codecov
if: matrix.go-version == '1.x'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}