Template
Update go.yml
This commit is contained in:
+15
-17
@@ -3,30 +3,28 @@
|
|||||||
|
|
||||||
name: Go
|
name: Go
|
||||||
|
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [ '1.16.x', '1.17.x', '1.18.x', '1.19.x', '1.20.x' ]
|
go-version: [ '1.16.x', '1.17.x', '1.18.x', '1.19.x', '1.20.x' ]
|
||||||
|
|
||||||
steps:
|
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: Setup Go ${{ matrix.go-version }}
|
- name: Build
|
||||||
uses: actions/setup-go@v3
|
run: go build -v ./...
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Test
|
||||||
run: go build -v ./...
|
run: go test -v ./...
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: go test -v ./...
|
|
||||||
|
|||||||
Reference in New Issue
Block a user