Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 870aa2c

Browse files
authored
sync: update CI config files (#146)
1 parent 02a6f2e commit 870aa2c

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.github/workflows/go-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
echo "RUNGOGENERATE=true" >> $GITHUB_ENV
2828
fi
2929
- name: Install staticcheck
30-
run: go install honnef.co/go/tools/cmd/staticcheck@df71e5d0e0ed317ebf43e6e59cf919430fa4b8f2 # 2021.1.1 (v0.2.1)
30+
run: go install honnef.co/go/tools/cmd/staticcheck@c8caa92bad8c27ae734c6725b8a04932d54a147b # 2021.1.2 (v0.2.2)
3131
- name: Check that go.mod is tidy
3232
uses: protocol/multiple-go-modules@v1.2
3333
with:

.github/workflows/go-test.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,24 @@ jobs:
2626
run: |
2727
go version
2828
go env
29+
- name: Use msys2 on windows
30+
if: ${{ matrix.os == 'windows' }}
31+
shell: bash
32+
# The executable for msys2 is also called bash.cmd
33+
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells
34+
# If we prepend its location to the PATH
35+
# subsequent 'shell: bash' steps will use msys2 instead of gitbash
36+
run: echo "C:/msys64/usr/bin" >> $GITHUB_PATH
2937
- name: Run repo-specific setup
3038
uses: ./.github/actions/go-test-setup
3139
if: hashFiles('./.github/actions/go-test-setup') != ''
3240
- name: Run tests
3341
uses: protocol/multiple-go-modules@v1.2
3442
with:
35-
run: go test -v -coverprofile module-coverage.txt ./...
43+
# Use -coverpkg=./..., so that we include cross-package coverage.
44+
# If package ./A imports ./B, and ./A's tests also cover ./B,
45+
# this means ./B's coverage will be significantly higher than 0%.
46+
run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./...
3647
- name: Run tests (32 bit)
3748
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
3849
uses: protocol/multiple-go-modules@v1.2
@@ -49,7 +60,7 @@ jobs:
4960
shell: bash
5061
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
5162
- name: Upload coverage to Codecov
52-
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
63+
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
5364
with:
5465
files: '${{ env.COVERAGES }}'
5566
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

.github/workflows/release-check.yml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ name: Release Checker
55
on:
66
pull_request:
77
paths: [ 'version.json' ]
8-
branches: [ master ]
98

109
jobs:
1110
release-check:

.github/workflows/releaser.yml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ name: Releaser
55
on:
66
push:
77
paths: [ 'version.json' ]
8-
branches: [ master ]
98

109
jobs:
1110
releaser:

0 commit comments

Comments
 (0)