Skip to content

Unit (tip)

Unit (tip) #1692

Workflow file for this run

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