-
Notifications
You must be signed in to change notification settings - Fork 465
48 lines (39 loc) · 1.23 KB
/
nightly-code-cover.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Nightly code coverage
on:
schedule:
- cron: '00 08 * * * '
workflow_dispatch:
jobs:
coverage-gen-and-publish:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v3
with:
# By default, checkout merges the PR into the current master.
# Instead, we want to check out the PR as-is.
ref: ${{ github.event.pull_request.head.sha }}
# Fetch all branches and history (we'll need the origin/master ref and
# the base commit).
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.21"
- name: Generate coverage
run: scripts/code-coverage.sh
- name: Install lcov
run: |
sudo apt-get update
sudo apt-get install lcov
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.CODECOVER_SERVICE_ACCOUNT_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 363.0.0'
- name: Publish coverage
run: scripts/code-coverage-publish.sh