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