From 68fdf59cdbe513bead3b973799af1ed106845fc9 Mon Sep 17 00:00:00 2001 From: Davide Bianchi Date: Mon, 20 Dec 2021 20:31:46 +0100 Subject: [PATCH] change go version to 1.17 and update workflow to support from go version 1.15 to 1.17 --- .github/workflows/test-builds.yml | 59 ++++++++++++++++--------------- go.mod | 11 +++++- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 2dc3959..7100411 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -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 diff --git a/go.mod b/go.mod index b133811..0b06e9a 100644 --- a/go.mod +++ b/go.mod @@ -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 +)