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