name: Build on: push: pull_request: schedule: - cron: 0 3 * * 6 # Every Saturday at 3:00 AM jobs: test: strategy: matrix: go-version: [1.16.x, 1.17.x, 1.18.x, tip] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: - name: Install Go if: matrix.go-version != 'tip' uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Install Go tip if: matrix.go-version == 'tip' run: | git clone --depth=1 https://go.googlesource.com/go $HOME/gotip cd $HOME/gotip/src ./make.bash echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV echo "$HOME/gotip/bin" >> $GITHUB_PATH echo "`$HOME/gotip/bin/go env GOPATH`/bin" >> $GITHUB_PATH - name: Checkout code uses: actions/checkout@v2 - name: Check go fmt compliance run: make fmt-check - name: Run go lint run: make lint - name: Run go vet run: make vet - name: Run nilness run: make nilness - name: Run staticcheck run: make staticcheck - name: Run tests run: make test