github.com/vicanso/hes@v0.7.0/.github/workflows/test.yml (about) 1 name: Test 2 3 on: 4 push: 5 branches: [ master ] 6 pull_request: 7 branches: [ master ] 8 9 jobs: 10 11 build: 12 name: Build 13 runs-on: ubuntu-latest 14 strategy: 15 matrix: 16 go: 17 - '1.22' 18 - '1.21' 19 - '1.20' 20 - '1.19' 21 steps: 22 23 - name: Go ${{ matrix.go }} test 24 uses: actions/setup-go@v2 25 with: 26 go-version: ${{ matrix.go }} 27 28 - name: Check out code into the Go module directory 29 uses: actions/checkout@v2 30 31 - name: Get dependencies 32 run: | 33 go get -v -t -d ./... 34 if [ -f Gopkg.toml ]; then 35 curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh 36 dep ensure 37 fi 38 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest 39 40 - name: Lint 41 run: make lint 42 43 - name: Test 44 run: make test