github.com/bytedance/gopkg@v0.0.0-20240514070511-01b2cbcf35e1/.github/workflows/push-check.yml (about)

     1  name: Push Check
     2  
     3  on:
     4    push:
     5      paths-ignore:
     6        - '**.md'
     7  
     8  jobs:
     9    build:
    10      runs-on: self-hosted
    11      steps:
    12        - uses: actions/checkout@v2
    13  
    14        - name: Set up Go
    15          uses: actions/setup-go@v2
    16          with:
    17            go-version: 1.15
    18  
    19        - uses: actions/cache@v2
    20          with:
    21            path: ~/go/pkg/mod
    22            key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    23            restore-keys: |
    24              ${{ runner.os }}-go-
    25  
    26        - name: Check License Header
    27          uses: apache/skywalking-eyes@main
    28          env:
    29            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    30  
    31        - name: Lint
    32          run: |
    33            test -z "$(gofmt -s -l .)"
    34            go vet -stdmethods=false $(go list ./...)
    35  
    36        - name: Unit Test
    37          run: go test -v -cpu=4 -race -covermode=atomic -coverprofile=coverage.out ./...