Skip to content

Commit 2045095

Browse files
authored
sync: update CI config files (#53)
* update .github/workflows/go-test.yml * update .github/workflows/go-check.yml Co-authored-by: web3-bot <[email protected]>
1 parent ac5f545 commit 2045095

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/go-check.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ jobs:
1616
run: go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2
1717
- name: Check that go.mod is tidy
1818
run: |
19-
cp go.mod go.mod.orig
20-
cp go.sum go.sum.orig
2119
go mod tidy
22-
diff go.mod go.mod.orig
23-
diff go.sum go.sum.orig
20+
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
21+
echo "go.sum was added by go mod tidy"
22+
exit 1
23+
fi
24+
git diff --exit-code -- go.sum go.mod
2425
- name: gofmt
2526
if: ${{ success() || failure() }} # run this step even if the previous one failed
2627
run: |

.github/workflows/go-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
3333
run: go test -v -race ./...
3434
- name: Upload coverage to Codecov
35-
uses: codecov/codecov-action@fcebab03f26c7530a22baa63f06b3e0515f0c7cd # v1.3.1
35+
uses: codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 # v1.4.1
3636
with:
3737
file: coverage.txt
3838
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

0 commit comments

Comments
 (0)