Skip to content

Commit 52983e9

Browse files
authored
Merge pull request #24 from Code-Hex/fix/actions
fixed github actions
2 parents 2efe971 + 14bcbc0 commit 52983e9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,27 @@ jobs:
1111
test:
1212
name: Test
1313
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
go:
18+
- '^1.18'
19+
- '^1.19'
1420
steps:
1521
- name: Check out code into the Go module directory
16-
uses: actions/checkout@v2
17-
- uses: actions/setup-go@v2
22+
uses: actions/checkout@v3
23+
- uses: actions/setup-go@v3
1824
with:
19-
go-version: '^1.18'
25+
go-version: ${{ matrix.go }}
26+
cache: true
2027
- name: Declare some variables
2128
id: vars
2229
run: |
2330
echo "::set-output name=coverage_txt::${RUNNER_TEMP}/coverage.txt"
2431
- name: Test Coverage (pkg)
2532
run: go test ./... -race -coverprofile=${{ steps.vars.outputs.coverage_txt }}
2633
- name: Upload coverage
34+
if: ${{ matrix.go == '^1.19' }}
2735
uses: codecov/codecov-action@v2
2836
with:
2937
files: ${{ steps.vars.outputs.coverage_txt }}

0 commit comments

Comments
 (0)