Skip to content

Update github workflows #19

Update github workflows

Update github workflows #19

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21', '1.22', '1.23' ]
name: Test on Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go test ./...
coverage:
name: Test on Go 1.23
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: ^1.23
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install dependencies
run: |
go version
go install golang.org/x/lint/golint@latest
- name: Run vet & lint
run: |
go vet ./...
golint ./...
- name: Test
run: go test -v -covermode=count -coverprofile=coverage.out ./...
- name: Convert coverage
uses: jandelgado/gcov2lcov-action@v1
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov