Update go.yml

This commit is contained in:
Lerking
2023-02-17 09:51:40 +01:00
committed by GitHub
parent 415e9be473
commit 3f9ca6b6f6

View File

@@ -3,30 +3,28 @@
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
matrix:
go-version: [ '1.16.x', '1.17.x', '1.18.x', '1.19.x', '1.20.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
# You can test your matrix by printing the current Go version
- name: Display Go version
run: go version
- name: Build
run: go build -v ./...
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Test
run: go test -v ./...