-
Notifications
You must be signed in to change notification settings - Fork 107
41 lines (35 loc) · 1.07 KB
/
test-unit-tip.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
name: Unit (tip)
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
env:
GITHUB_ACTIONS: true
jobs:
test:
name: "go-HEAD @ ubuntu-latest"
runs-on: ubuntu-latest
steps:
# https://github.com/actions/setup-go/issues/21#issuecomment-565741980
- name: Install Go HEAD
run: |
export GOROOT_BOOTSTRAP=`go env GOROOT`
export GOROOT_FINAL=/go
export GOROOT=$HOME/gotip
mkdir $HOME/gotip
cd $HOME/gotip
curl -s 'https://go.googlesource.com/go/+/refs/heads/master?format=JSON' | awk '/"commit"/{print substr($2,2,40);exit}' >HEAD
awk '{printf("gotip-%s",substr($0,0,7))}' <HEAD >VERSION
curl -s -o go.tar.gz https://go.googlesource.com/go/+archive/`cat HEAD`.tar.gz
tar xfz go.tar.gz
cd src
bash make.bash
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
echo "$GOROOT/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with: { fetch-depth: 1 }
- run: go version
- run: make test-unit race=true