Changes by create-pull-request action #74
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs the unit test (`go test ./...`) on vaious platforms, | |
# such as: Linux, macOS and Windows. | |
name: Test on macOS/Win/Linux | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
coverage: | |
name: Platform test | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '^1.17' | |
- name: Use Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Download Modules | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: go mod download | |
- name: Run unit tests | |
run: | | |
go mod download | |
go test -v ./... |