Skip to content

Commit

Permalink
Merge pull request #11 from Open-CMSIS-Pack/vendorUrlTime
Browse files Browse the repository at this point in the history
incremented version number of go
  • Loading branch information
bgn42 authored Aug 30, 2024
2 parents 1452bda + 08ab57d commit 67a3d58
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 311 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
go: [1.16.x]
go: [1.22.x]
name: '${{ matrix.platform }} | ${{ matrix.go }}'
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install go 1.16
uses: actions/setup-go@v2
uses: actions/checkout@v4
- name: Install go 1.22
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go 1.16
uses: actions/setup-go@v2
uses: actions/checkout@v4
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.16
go-version: 1.22
- name: Generate release notes
run: |
git fetch --unshallow
./scripts/release_notes > /tmp/RELEASE_NOTES
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --rm-dist --release-notes=/tmp/RELEASE_NOTES
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
# must be specified without patch version
version: v1.36
version: latest

format:
name: Format
strategy:
matrix:
platform: [ubuntu-latest]
go: [1.16.x]
go: [1.22.x]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install go 1.16
uses: actions/setup-go@v2
uses: actions/checkout@v4
- name: Install go 1.22
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Check formatting
Expand All @@ -40,14 +40,14 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
go: [1.16.x]
go: [1.22.x]
name: '${{ matrix.platform }} | ${{ matrix.go }}'
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install go 1.16
uses: actions/setup-go@v2
uses: actions/checkout@v4
- name: Install go 1.22
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Unit testing
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ run:
linters:
disable-all: true # Disable defaults, then enable the ones we want
enable:
- deadcode
# - deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
# - structcheck
- typecheck
- unused
- varcheck
# - varcheck
- bodyclose
- stylecheck
- gosec
Expand Down
4 changes: 1 addition & 3 deletions cmd/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -220,7 +219,6 @@ func TestReadXML(t *testing.T) {
t.Run("test local xml file fails to read", func(t *testing.T) {
errString := "failed to read file"

// ioutil.ReadAll is just an alias to io.ReadAll
monkey.Patch(io.ReadAll, func(r io.Reader) ([]byte, error) {
var empty []byte
return empty, errors.New(errString)
Expand Down Expand Up @@ -320,7 +318,7 @@ func TestWriteXML(t *testing.T) {
t.Errorf("WriteXML should not return error on valid xml and valid file: %s", err)
}

written, err2 := ioutil.ReadFile(fileName)
written, err2 := os.ReadFile(fileName)
if err2 != nil {
t.Fatalf("Can't open file %s to test if XML got actually written: %s", fileName, err2)
}
Expand Down
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
module github.com/open-cmsis-pack/vidx2pidx

go 1.16
go 1.22.5

require (
bou.ke/monkey v1.0.2
github.com/spf13/cobra v1.1.3
github.com/spf13/cobra v1.8.1
)

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
Loading

0 comments on commit 67a3d58

Please sign in to comment.