Skip to content

Update Go version

Update Go version #69

Workflow file for this run

name: Check and test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
env:
# run coverage only with the latest Go version
LATEST_GO_VERSION: "1.22"
jobs:
test:
strategy:
matrix:
go-version: [ "1.21", "1.22" ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code of this branch
uses: actions/checkout@v4
- name: Execute Go lint, check, test
run: |
make init
make check
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
- name: Upload coverage to Codecov
if: success() && matrix.go == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false