Skip to content

Fix godev workflow

Fix godev workflow #87

Workflow file for this run

name: test
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
jobs:
test:
runs-on: windows-latest
env:
GO111MODULE: on
strategy:
fail-fast: false
matrix:
go:
- '1.18'
- '1.19'
- '1.20'
- '1.21'
- '1.22'
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
-
name: Cache Go modules
uses: actions/cache@v4
with:
path: |
%LocalAppData%\go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}-
-
name: Go mod
run: |
go mod download
shell: bash
-
name: Test
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
shell: bash
-
name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt