Debian Codegraph @

.github/workflows/build.yml

raw
1 name: Build
2 on:
3 push:
4 pull_request:
5 schedule:
6 - cron: 0 3 * * 6 # Every Saturday at 3:00 AM
7 jobs:
8 test:
9 strategy:
10 matrix:
11 go-version: [1.16.x, 1.17.x, 1.18.x, tip]
12 platform: [ubuntu-latest]
13 runs-on: ${{ matrix.platform }}
14 steps:
15 - name: Install Go
16 if: matrix.go-version != 'tip'
17 uses: actions/setup-go@v2
18 with:
19 go-version: ${{ matrix.go-version }}
20 - name: Install Go tip
21 if: matrix.go-version == 'tip'
22 run: |
23 git clone --depth=1 https://go.googlesource.com/go $HOME/gotip
24 cd $HOME/gotip/src
25 ./make.bash
26 echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
27 echo "$HOME/gotip/bin" >> $GITHUB_PATH
28 echo "`$HOME/gotip/bin/go env GOPATH`/bin" >> $GITHUB_PATH
29 - name: Checkout code
30 uses: actions/checkout@v2
31 - name: Check go fmt compliance
32 run: make fmt-check
33 - name: Run go lint
34 run: make lint
35 - name: Run go vet
36 run: make vet
37 - name: Run nilness
38 run: make nilness
39 - name: Run staticcheck
40 run: make staticcheck
41 - name: Run tests
42 run: make test