forked from FiloSottile/age
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (68 loc) · 1.93 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Go tests
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
go: [1.18.x, 1.19.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run tests
run: go test -race ./...
freebsd:
name: Test (FreeBSD)
runs-on: macos-10.15
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run tests
# Unpinned Action allowed with read-only permissions.
uses: vmactions/freebsd-vm@v0
with:
prepare: |
freebsd-version
pkg install -y go
go version
run: go test -buildvcs=false -race ./...
gotip:
name: Test (Go tip)
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go tip (UNIX)
if: runner.os != 'Windows'
run: |
git clone --filter=tree:0 https://go.googlesource.com/go $HOME/gotip
cd $HOME/gotip/src && ./make.bash
echo "$HOME/gotip/bin" >> $GITHUB_PATH
- name: Install Go tip (Windows)
if: runner.os == 'Windows'
run: |
git clone --filter=tree:0 https://go.googlesource.com/go $HOME/gotip
cd $HOME/gotip/src && ./make.bat
echo "$HOME/gotip/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: go version
- name: Run tests
run: go test -race ./...