Skip to content

Commit 8bb3c9b

Browse files
committed
ci: Run unit tests on ubuntu, windows and macos
1 parent 0f0a4e3 commit 8bb3c9b

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/ci.yaml

+30-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,33 @@ jobs:
2828
with:
2929
version: latest
3030
only-new-issues: true
31-
args: --timeout=3m
31+
args: --timeout=3m
32+
33+
unit-test:
34+
name: unit-test
35+
strategy:
36+
matrix:
37+
go-version: [ 1.19.8, 1.20.3 ]
38+
os: [ ubuntu-latest, windows-latest, macos-latest ]
39+
runs-on: ${{ matrix.os }}
40+
steps:
41+
- uses: actions/setup-go@v4
42+
with:
43+
go-version: ${{ matrix.go-version }}
44+
- uses: actions/checkout@v3
45+
- uses: actions/cache@v3
46+
with:
47+
# In order:
48+
# * Module download cache
49+
# * Build cache (Linux)
50+
# * Build cache (Mac)
51+
# * Build cache (Windows)
52+
path: |
53+
~/go/pkg/mod
54+
~/.cache/go-build
55+
~/Library/Caches/go-build
56+
~\AppData\Local\go-build
57+
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
58+
restore-keys: |
59+
${{ runner.os }}-go-${{ matrix.go-version }}-
60+
- run: go test ./... --tags unit

0 commit comments

Comments
 (0)