change go version to 1.17 and update workflow to support from go version 1.15 to 1.17

This commit is contained in:
Davide Bianchi
2021-12-20 20:31:46 +01:00
parent ebb8822041
commit 68fdf59cdb
2 changed files with 41 additions and 29 deletions

View File

@@ -5,32 +5,35 @@ on:
push:
jobs:
tests:
name: Test on go ${{ matrix.go_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version: [1.15]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use golang ${{ matrix.go_version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
name: Test on go ${{ matrix.go_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version: [1.15, 1.16, 1.17]
os: [ubuntu-latest]
include:
- go_version: 1.17
os: macos-latest
steps:
- uses: actions/checkout@v1
- name: Use golang ${{ matrix.go_version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
- name: Go version
run: |
go version
- name: Go get dependencies
run: |
go get -v -t -d ./...
- name: Run tests
run: |
go test ./... -count=1 -race -cover -coverprofile cover.out
- name: Build
run: |
go build -v .
- name: Send the coverage output
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out
- name: Go version
run: |
go version
- name: Go get dependencies
run: |
go get -v -t -d ./...
- name: Run tests
run: |
go test ./... -count=1 -race -cover -coverprofile cover.out
- name: Build
run: |
go build -v .
- name: Send the coverage output
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out

11
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/davidebianchi/gswagger
go 1.15
go 1.17
require (
github.com/alecthomas/jsonschema v0.0.0-20210920000243-787cd8204a0d
@@ -12,3 +12,12 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/stretchr/testify v1.7.0
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)