2021-05-05 12:48:57 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
name: Test
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-01-25 16:05:09 +00:00
|
|
|
go-version: [1.18.x, 1.19.x]
|
2021-05-05 12:48:57 +00:00
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
2023-01-25 16:05:09 +00:00
|
|
|
uses: actions/setup-go@v3
|
2021-05-05 12:48:57 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Checkout code
|
2023-01-25 16:05:09 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
2021-08-16 09:47:56 +00:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
2021-05-05 12:48:57 +00:00
|
|
|
- name: Test
|
|
|
|
run: go test -race -bench . -benchmem ./...
|
|
|
|
- name: Test CBOR
|
|
|
|
run: go test -tags binary_log ./...
|
|
|
|
|