Skip to content

Commit 7353d85

Browse files
author
Sergey Vilgelm
committed
Add tests-on-macos to cover all main platforms
Run golangci-lint-action in matrics mode for all platforms
1 parent cae1842 commit 7353d85

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

.github/workflows/pr.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ jobs:
1212
# our GitHub action with the latest stable golangci-lint.
1313
golangci-lint:
1414
name: golangci-lint
15-
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
os:
18+
- ubuntu-latest
19+
- macos-latest
20+
- windows-latest
21+
runs-on: ${{ matrix.os }}
1622
steps:
1723
- uses: actions/checkout@v2
1824
- name: lint
1925
uses: golangci/golangci-lint-action@v2
2026
with:
2127
version: latest
28+
args: --timeout 4m
2229
tests-on-windows:
2330
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
2431
runs-on: windows-latest
@@ -28,20 +35,29 @@ jobs:
2835
uses: actions/setup-go@v2
2936
with:
3037
go-version: 1.14 # test only the latest go version to speed up CI
31-
- name: Run tests on Windows
38+
- name: Run tests
3239
run: make.exe test
3340
continue-on-error: true
41+
tests-on-macos:
42+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
43+
runs-on: macos-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Install Go
47+
uses: actions/setup-go@v2
48+
with:
49+
go-version: 1.14 # test only the latest go version to speed up CI
50+
- name: Run tests
51+
run: make test
52+
continue-on-error: true
3453
tests-on-unix:
3554
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
36-
runs-on: ${{ matrix.os }}
55+
runs-on: ubuntu-latest
3756
strategy:
3857
matrix:
3958
golang:
4059
- 1.13
4160
- 1.14
42-
os:
43-
- ubuntu-latest
44-
# don't enable mac os because it's machines are very slow
4561
steps:
4662
- uses: actions/checkout@v2
4763
- name: Install Go
@@ -54,7 +70,7 @@ jobs:
5470
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('**/go.sum') }}
5571
restore-keys: |
5672
${{ runner.os }}-go-${{ matrix.golang }}-
57-
- name: Run tests on Unix-like operating systems
73+
- name: Run tests
5874
run: make test
5975
check_generated:
6076
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors

0 commit comments

Comments
 (0)