Skip to content

Commit 97e4adc

Browse files
authored
Merge pull request #66 from cloudstruct/ci/golang-matrix
ci: golang matrix for testing
2 parents 9cdda7c + fad39c3 commit 97e4adc

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed
Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file was copied from the following URL and modified:
22
# https://github.com/golangci/golangci-lint-action/blob/master/README.md#how-to-use
33

4-
name: golangci-lint
4+
name: golangci
55
on:
66
push:
77
tags:
@@ -12,34 +12,26 @@ on:
1212
pull_request:
1313
permissions:
1414
contents: read
15-
# Optional: allow read access to pull request. Use with `only-new-issues` option.
16-
# pull-requests: read
15+
pull-requests: read
1716
jobs:
1817
golangci:
1918
name: lint
20-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
go-version: [1.18.x, 1.19.x]
22+
platform: [ubuntu-latest, macos-latest]
23+
runs-on: ${{ matrix.platform }}
2124
steps:
2225
- uses: actions/checkout@v2
2326
- uses: actions/setup-go@v3
2427
with:
25-
go-version: '1.18'
28+
go-version: ${{ matrix.go-version }}
2629
- name: golangci-lint
2730
uses: golangci/golangci-lint-action@v3
2831
with:
29-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
30-
version: v1.45.2 # current version at time of commit
31-
32-
# Optional: working directory, useful for monorepos
33-
# working-directory: somedir
34-
32+
version: v1.50.1 # current version at time of commit
3533
# Optional: golangci-lint command line arguments.
3634
# args: --issues-exit-code=0
37-
38-
# Optional: show only new issues if it's a pull request. The default value is `false`.
39-
# only-new-issues: true
40-
41-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
42-
# skip-pkg-cache: true
43-
44-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
45-
# skip-build-cache: true
35+
only-new-issues: true
36+
- name: go-test
37+
run: go test ./...

0 commit comments

Comments
 (0)