github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/.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.16.x, 1.15.x]
    17          platform: [ubuntu-latest]
    18          env:
    19            - TAGS=""
    20            - TAGS="-tags bounds"
    21            - TAGS="-tags noasm"
    22            - TAGS="-tags safe"
    23  
    24      runs-on: ${{ matrix.platform }}
    25      env:
    26          GO111MODULE: on
    27          GOPATH: ${{ github.workspace }}
    28      defaults:
    29          run:
    30              working-directory: ${{ env.GOPATH }}/src/github.com/jingcheng-WU/gonum
    31  
    32      steps:
    33      - name: Install Go
    34        uses: actions/setup-go@v2
    35        with:
    36          go-version: ${{ matrix.go-version }}
    37  
    38      - name: Cache-Go
    39        uses: actions/cache@v1
    40        with:
    41          path: |
    42              ~/go/pkg/mod              # Module download cache
    43              ~/.cache/go-build         # Build cache (Linux)
    44              ~/Library/Caches/go-build # Build cache (Mac)
    45              '%LocalAppData%\go-build' # Build cache (Windows)
    46  
    47          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    48          restore-keys: |
    49            ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    50  
    51      - name: Checkout code
    52        uses: actions/checkout@v2
    53        with:
    54            path: ${{ env.GOPATH }}/src/github.com/jingcheng-WU/gonum
    55  
    56      - name: Coverage
    57        if: matrix.platform == 'ubuntu-latest'
    58        run: |
    59          ./.github/workflows/script.d/test-coverage.sh
    60  
    61      - name: Upload-Coverage
    62        if: matrix.platform == 'ubuntu-latest'
    63        uses: codecov/codecov-action@v1
    64        with:
    65          override_pr: ${{ github.event.pull_request.number }}
    66          override_commit: ${{ github.event.pull_request.merge_commit_sha }}
    67          override_branch: "refs/heads/master"