-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.11 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: test
on:
pull_request:
# push:
# branches:
# - main
# tags:
# - v*
workflow_dispatch:
workflow_call:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
# https://github.com/magnetikonline/action-golang-cache
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@797f193169d3c8ba6f60d90f50ecdadd2583fbd8 # tag=v3
with:
go-version-file: go.mod
- name: mage-tidy
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f # v2
with:
version: latest
args: go:tidy
- name: mage-test
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f # v2
with:
version: latest
args: go:testsum ./...
env:
# Race conditions will be hit due to the cli driven tasks and binaries being called.
GOTEST_DISABLE_RACE: 1