Skip to content

Update: Add golang v1.20 and v1.21 to build #16

Update: Add golang v1.20 and v1.21 to build

Update: Add golang v1.20 and v1.21 to build #16

Workflow file for this run

name: build-go
on:
push:
branches:
- master
pull_request:
defaults:
run:
shell: bash
env:
GO111MODULE: on
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: setup
run: |
go version
go install github.com/securego/gosec/cmd/gosec@latest
go install github.com/axw/gocov/gocov@master
go install github.com/AlekSi/gocov-xml@latest
- name: setup-for-older-go
if: ${{ matrix.go <= 1.17 }}
run: |
# stay on an older version of golangci-lint which still builds against 1.17
# This is due to the introduction of generics.
go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: setup-for-newer-go
if: ${{ matrix.go > 1.17 }}
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: build
run: |
make