-
Notifications
You must be signed in to change notification settings - Fork 619
37 lines (31 loc) · 1.03 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
name: Unit (tip)
on:
schedule:
- cron: '0 1 * * *'
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@v2
with: { fetch-depth: 1 }
- run: go version
- run: make test-unit race=true