github.com/llir/llvm@v0.3.6/.github/workflows/coverage.yml (about)

     1  on:
     2    pull_request:
     3      paths:
     4      - '**.go'
     5    # allow you to run this workflow manually from tab
     6    workflow_dispatch:
     7  
     8  jobs:
     9    coverage:
    10      name: Coverage
    11      runs-on: ubuntu-latest
    12      steps:
    13      - name: Set up Go 1.x
    14        if: success()
    15        uses: actions/setup-go@v2
    16        with:
    17          go-version: ^1.15
    18        id: go
    19      - name: Checkout code
    20        uses: actions/checkout@v2
    21      - name: Calculate coverage
    22        run: |
    23          git submodule update --init
    24          go test -v -covermode=count -coverprofile=coverage.out ./...
    25      - name: Coveralls
    26        env:
    27          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    28        run: |
    29          go install github.com/mattn/goveralls@latest
    30          $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github