Skip to content

.github: use minimum required Go version from go.mod file #309

.github: use minimum required Go version from go.mod file

.github: use minimum required Go version from go.mod file #309

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches:
- master
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
<<<<<<< HEAD

Check failure on line 23 in .github/workflows/go.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/go.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
=======
- uses: actions/checkout@v3
>>>>>>> 9a918d4 (.github: use minimum required Go version from go.mod file)
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.19', '1.20', '1.21']
steps:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go mod download
- name: Tests
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)