1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- name: Go
- on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- jobs:
- build:
- name: "Build for go v${{ matrix.go }}"
- runs-on: ubuntu-latest
- strategy:
- matrix:
- go:
- - "1.22"
- - "1.21"
- - "1.20"
- - "1.19"
- - "1.18"
- - "1.17"
- - "1.16"
- steps:
- - uses: actions/checkout@v4
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go }}
- - name: Build
- run: go build -v ./...
-
- staticcheck:
- name: "Static check"
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: "1.19"
- - name: staticcheck
- run: |
- go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 &&
- $HOME/go/bin/staticcheck ./...
- - name: Revive Action
- uses: morphy2k/revive-action@v2.1.1
- with:
- config: .revive.toml
- test:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- go:
- - "1.22"
- - "1.21"
- - "1.20"
- - "1.19"
- - "1.18"
- - "1.17"
- - "1.16"
- steps:
- - uses: actions/checkout@v2
- - name: Set up Go
- uses: actions/setup-go@v2
- with:
- go-version: ${{ matrix.go }}
- - name: Test
- run: go test -gcflags=all=-l ./...
|