
on:
  workflow_dispatch:
  pull_request:
      types: [opened, reopened,ready_for_review,synchronize]
  push:
    branches:
      - main
      - master
name: Test Go Tip
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - name: Install Go tip
      run: |
        curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
        ls -lah gotip.tar.gz
        mkdir -p ~/sdk/gotip
        tar -C ~/sdk/gotip -xzf gotip.tar.gz
        ~/sdk/gotip/bin/go version
        echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
    - name: Checkout
      uses: actions/checkout@v2
      with:
        submodules: recursive
    - id: Cache
      uses: actions/cache@v2
      with:
        path: |
          ~/go/pkg/mod              # Module download cache
          ~/.cache/go-build         # Build cache (Linux)
        key: ubuntu-go-${{ hashFiles('**/go.sum') }}
        restore-keys: |
          ubuntu-go-
    - name: Dependencies
      run: go mod download
      if: steps.cache.outputs.cache-hit != 'true'
    - name: Test
      run: go test ./...
    - name: Test 32 bit
      env:
        GOARCH: 386
      run: go test ./...
    - name: Test with race detector
      run: go test -race ./...

Add go tip github action
Add go tip github action
