9e38ee5135
Part of https://github.com/ooni/probe/issues/1753. While there, introduce a rule by which, if the branch is named `fullbuild` we run all possible builds. It helps to test all the builds without creating a release branch. Because release branches are protected, they cannot be deleted easily. On the contrary, the `fullbuild` branch can easily be disposed of.
41 lines
988 B
YAML
41 lines
988 B
YAML
# Runs tests and computes the code coverage
|
|
name: coverage
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
- "release/**"
|
|
- "fullbuild"
|
|
|
|
jobs:
|
|
measure_coverage:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Get GOVERSION content
|
|
id: goversion
|
|
run: echo ::set-output name=version::$(cat GOVERSION)
|
|
|
|
- uses: magnetikonline/action-golang-cache@v2
|
|
with:
|
|
go-version: "${{ steps.goversion.outputs.version }}"
|
|
cache-key-suffix: "-coverage-${{ steps.goversion.outputs.version }}"
|
|
|
|
- run: go test -short -race -tags shaping -coverprofile=probe-cli.cov ./...
|
|
|
|
- uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: probe-cli.cov
|
|
parallel: true
|
|
|
|
finish_measuring_coverage:
|
|
needs: measure_coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
parallel-finished: true
|