From 33e3e4b65e022aeabbcadf8647f5de31d6435e60 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 3 Jan 2023 10:20:08 -0500 Subject: fix: resolve Go vulnerabilities Resolves #975 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/go.yml | 4 ++-- .github/workflows/release.yml | 2 +- go.mod | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e5fcd1f1..c7876f2d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - uses: actions/checkout@v3 # Run benchmark with `go test -bench` and stores the output to a file - name: Run benchmark diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 90400553..7a9a130c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - go-version: [1.18.x] + go-version: [1.19.x] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -46,7 +46,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: 1.18.x + go-version: 1.19.x - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a245f052..c93c857e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18.x + go-version: 1.19.x - name: Check out code uses: actions/checkout@v2 diff --git a/go.mod b/go.mod index 34081235..d3156613 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/MichaelMure/git-bug -go 1.18 +go 1.19 require ( github.com/99designs/gqlgen v0.17.20 -- cgit From 58a6962f4e78afa1208f40578caf7ac2b7a04184 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 3 Jan 2023 19:48:38 -0500 Subject: ci: use Go 1.19.4 and setup-go@v3 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/go.yml | 9 ++++----- .github/workflows/release.yml | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c7876f2d..16fb5d7e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.19.4 - uses: actions/checkout@v3 # Run benchmark with `go test -bench` and stores the output to a file - name: Run benchmark diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7a9a130c..d0f2585d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - go-version: [1.19.x] + go-version: [1.19.4] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} @@ -20,7 +20,7 @@ jobs: steps: - name: Set up Go ${{ matrix.node-version }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} @@ -44,13 +44,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.19.4 - name: Checkout code uses: actions/checkout@v2 - name: Check Code Formatting run: find . -name "*.go" | while read line; do [ -z "$(gofmt -d "$line" | head)" ] || exit 1; done - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c93c857e..80751500 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,9 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.19.4 - name: Check out code uses: actions/checkout@v2 @@ -38,4 +38,4 @@ jobs: repo_token: "${{ secrets.GITHUB_TOKEN }}" draft: true prerelease: false - files: dist/* \ No newline at end of file + files: dist/* -- cgit From 4cee3a7278a493378429fd32dfa12c27f70bcca3 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 3 Jan 2023 20:17:17 -0500 Subject: test(cache): close second instance of RepoCache --- cache/repo_cache_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go index 796b5db9..eeaa0ee5 100644 --- a/cache/repo_cache_test.go +++ b/cache/repo_cache_test.go @@ -130,6 +130,14 @@ func TestCache(t *testing.T) { require.NoError(t, err) _, err = cache.Bugs().ResolvePrefix(bug1.Id().String()[:10]) require.NoError(t, err) + + // Close + require.NoError(t, cache.Close()) + require.Empty(t, cache.bugs.cached) + require.Empty(t, cache.bugs.excerpts) + require.Empty(t, cache.identities.cached) + require.Empty(t, cache.identities.excerpts) + } func TestCachePushPull(t *testing.T) { -- cgit From 59684d74776738723901095c73782fbc619138e4 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 3 Jan 2023 20:41:57 -0500 Subject: style(TestCache): remove empty trailing line from function --- cache/repo_cache_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go index eeaa0ee5..ac5a7c75 100644 --- a/cache/repo_cache_test.go +++ b/cache/repo_cache_test.go @@ -137,7 +137,6 @@ func TestCache(t *testing.T) { require.Empty(t, cache.bugs.excerpts) require.Empty(t, cache.identities.cached) require.Empty(t, cache.identities.excerpts) - } func TestCachePushPull(t *testing.T) { -- cgit