Skip to content

Commit

Permalink
Try with test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbjeldbak committed Jun 29, 2022
1 parent db64b9a commit 6bac200
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Insipired by: https://github.com/spf13/cobra/blob/master/.github/workflows/test.yml
name: Test

on:
Expand All @@ -10,6 +11,7 @@ env:
jobs:
golangci-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -22,3 +24,33 @@ jobs:
with:
version: latest
args: --verbose

test-unix:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu
- macOS
go:
- 17
- 18
name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'
runs-on: ${{ matrix.platform }}-latest
steps:

- name: Checkout repository
uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: 1.{{ matrix.go }}.x

- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-

- run: go test -v

0 comments on commit 6bac200

Please sign in to comment.