github.com/lmittmann/w3@v0.20.0/.github/workflows/go.yml (about)

     1  name: Go
     2  
     3  on:
     4    push:
     5      branches:
     6        - main
     7    pull_request:
     8  
     9  jobs:
    10    lint:
    11      name: Lint
    12      runs-on: ubuntu-latest
    13      steps:
    14        - uses: actions/checkout@v4
    15        - uses: actions/setup-go@v5
    16          with:
    17            go-version: "1.24"
    18        - name: fmt
    19          run: diff -u <(echo -n) <(gofmt -s -d .)
    20        - name: vet
    21          run: go vet ./...
    22        - name: staticcheck
    23          run: go run honnef.co/go/tools/cmd/staticcheck@latest ./...
    24        - name: tidy
    25          run: go mod tidy -diff
    26  
    27    test:
    28      name: Test
    29      runs-on: ubuntu-latest
    30      env:
    31        RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
    32      steps:
    33        - uses: actions/checkout@v4
    34        - uses: actions/setup-go@v5
    35          with:
    36            go-version: "1.24"
    37        - name: test
    38          run: go test -covermode atomic -coverprofile=covprofile ./...
    39        - name: goveralls
    40          env:
    41            COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    42          run: go run github.com/mattn/goveralls@latest -coverprofile=covprofile -service=github