35 lines
660 B
YAML
35 lines
660 B
YAML
name: Golang test
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
tags-ignore:
|
|
- '*'
|
|
|
|
jobs:
|
|
go-test:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
name: Checkout code
|
|
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: "go.mod"
|
|
cache: true
|
|
|
|
- name: Download go dependencies
|
|
run: go get ./...
|
|
|
|
- name: Mount tmpfs (linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: sudo mount -t tmpfs tmpfs /tmp
|
|
|
|
- name: Test
|
|
run: go test -timeout 0 -v ./...
|