chore(ci): start saving/restoring go build cache (#721)
This commit uses a build cache for the coverage and netxlite github actions. See https://github.com/ooni/probe/issues/2093.
This commit is contained in:
parent
ded4b08113
commit
e93756be20
4
.github/workflows/checks.yml
vendored
4
.github/workflows/checks.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
# checks performs several code quality checks
|
# performs several code quality checks
|
||||||
name: checks
|
name: checks
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -6,7 +6,7 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
perform_code_quality_checks:
|
||||||
runs-on: "${{ matrix.os }}"
|
runs-on: "${{ matrix.os }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
13
.github/workflows/coverage.yml
vendored
13
.github/workflows/coverage.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
# coverage computes the code coverage
|
# runs tests and computes the code coverage
|
||||||
name: coverage
|
name: coverage
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -7,7 +7,8 @@ on:
|
||||||
- "master"
|
- "master"
|
||||||
- "release/**"
|
- "release/**"
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
|
measure_coverage:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -15,17 +16,19 @@ jobs:
|
||||||
- "1.17.9"
|
- "1.17.9"
|
||||||
- "1.18.1"
|
- "1.18.1"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v1
|
- uses: magnetikonline/action-golang-cache@v2
|
||||||
with:
|
with:
|
||||||
go-version: "${{ matrix.go }}"
|
go-version: "${{ matrix.go }}"
|
||||||
|
cache-key-suffix: "-coverage-${{ matrix.go }}"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: go test -short -race -tags shaping -coverprofile=probe-cli.cov ./...
|
- run: go test -short -race -tags shaping -coverprofile=probe-cli.cov ./...
|
||||||
- uses: shogo82148/actions-goveralls@v1
|
- uses: shogo82148/actions-goveralls@v1
|
||||||
with:
|
with:
|
||||||
path-to-profile: probe-cli.cov
|
path-to-profile: probe-cli.cov
|
||||||
parallel: true
|
parallel: true
|
||||||
finish:
|
|
||||||
needs: test
|
finish_measuring_coverage:
|
||||||
|
needs: measure_coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: shogo82148/actions-goveralls@v1
|
- uses: shogo82148/actions-goveralls@v1
|
||||||
|
|
5
.github/workflows/netxlite.yml
vendored
5
.github/workflows/netxlite.yml
vendored
|
@ -6,15 +6,16 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test_netxlite_package:
|
||||||
runs-on: "${{ matrix.os }}"
|
runs-on: "${{ matrix.os }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [ "1.17.9" ]
|
go: [ "1.17.9" ]
|
||||||
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
|
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v1
|
- uses: magnetikonline/action-golang-cache@v2
|
||||||
with:
|
with:
|
||||||
go-version: "${{ matrix.go }}"
|
go-version: "${{ matrix.go }}"
|
||||||
|
cache-key-suffix: "-coverage-${{ matrix.go }}"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: go test -race ./internal/netxlite/...
|
- run: go test -race ./internal/netxlite/...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user