github.com/GuanceCloud/cliutils@v1.1.21/.github/workflows/go.yml (about)

     1  # This workflow will build a golang project
     2  # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
     3  
     4  name: Go
     5  
     6  on:
     7    push:
     8      branches: [ "main" ]
     9    pull_request:
    10      branches: [ "main" ]
    11  
    12  jobs:
    13  
    14    build:
    15      runs-on: ubuntu-latest
    16      steps:
    17      - uses: actions/checkout@v3
    18  
    19      - name: Set up Go
    20        uses: actions/setup-go@v4
    21        with:
    22          go-version: '1.19'
    23  
    24      - name: Set up lint
    25        run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
    26        #run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
    27  
    28      - name: Lint
    29        run: make lint
    30  
    31      - name: Build
    32        run: go build -v ./...
    33  
    34  
    35      #- name: Test
    36      #  run: go test -v ./...