gonum.org/v1/gonum@v0.14.0/.github/workflows/codecov.yml (about)

     1  name: Codecov
     2  
     3  on:
     4    pull_request:
     5      branches: [ master ]
     6      types:
     7        - closed
     8  
     9  jobs:
    10  
    11    build:
    12      name: Build
    13      if: github.event.pull_request.merged == true
    14      strategy:
    15        matrix:
    16          go-version: [1.21.x]
    17          platform: [ubuntu-latest]
    18          tags: 
    19            - ""
    20            - "-tags bounds"
    21            - "-tags noasm"
    22            - "-tags safe"
    23  
    24      runs-on: ${{ matrix.platform }}
    25      env:
    26          GO111MODULE: on
    27          GOPATH: ${{ github.workspace }}
    28          TAGS: ${{ matrix.tags }}
    29      defaults:
    30          run:
    31              working-directory: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
    32  
    33      steps:
    34      - name: Install Go
    35        uses: actions/setup-go@v2
    36        with:
    37          go-version: ${{ matrix.go-version }}
    38  
    39      - name: Checkout code
    40        uses: actions/checkout@v2
    41        with:
    42          path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
    43  
    44      - name: Cache-Go
    45        uses: actions/cache@v2
    46        with:
    47          # In order:
    48          # * Module download cache
    49          # * Build cache (Linux)
    50          # * Build cache (Mac)
    51          # * Build cache (Windows)
    52          path: |
    53            ~/go/pkg/mod
    54            ~/.cache/go-build
    55            ~/Library/Caches/go-build
    56            '%LocalAppData%\go-build'
    57          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    58          restore-keys: |
    59            ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    60  
    61      - name: Coverage
    62        if: matrix.platform == 'ubuntu-latest'
    63        run: |
    64          ./.github/workflows/script.d/test-coverage.sh
    65  
    66      - name: Upload-Coverage
    67        if: matrix.platform == 'ubuntu-latest'
    68        uses: codecov/codecov-action@v1
    69        with:
    70          override_pr: ${{ github.event.pull_request.number }}
    71          override_commit: ${{ github.event.pull_request.merge_commit_sha }}
    72          override_branch: "refs/heads/master"