github.com/orijtech/structslop@v0.0.9-0.20230520012622-069644583b8b/.github/workflows/go.yaml (about) 1 name: Go 2 3 on: 4 push: 5 branches: 6 - master 7 pull_request: 8 9 jobs: 10 test: 11 name: Test 12 runs-on: ubuntu-latest 13 steps: 14 - uses: actions/checkout@v2 15 - uses: actions/setup-go@v2 16 with: 17 go-version: 1.20.x 18 - name: Cache 19 uses: actions/cache@v2 20 with: 21 path: | 22 ~/go/bin 23 ~/go/src 24 ~/go/pkg/mod 25 ~/.cache/go-build 26 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 27 restore-keys: | 28 ${{ runner.os }}-go- 29 - run: go version 30 - run: go test -race -v ./... 31 build-gotip: 32 name: Build using gotip 33 runs-on: ubuntu-latest 34 steps: 35 - uses: actions/checkout@v2 36 - uses: actions/setup-go@v2 37 with: 38 go-version: 1.20.x 39 - run: go install golang.org/dl/gotip@latest 40 - run: gotip download 41 - run: gotip version 42 - run: gotip build ./cmd/structslop 43 lint: 44 name: Lint 45 runs-on: ubuntu-latest 46 steps: 47 - uses: actions/checkout@v2 48 - uses: golangci/golangci-lint-action@v2