Skip to content

Add GitHub action for building and testing with multiple versions of Go #1

Add GitHub action for building and testing with multiple versions of Go

Add GitHub action for building and testing with multiple versions of Go #1

Workflow file for this run

# This workflow will build and test a golang project for multiple versions of Go
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.18', '1.19', '1.20', '1.21', '>=1.22' ]
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...