PBM Coverage Report #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PBM Coverage Report | |
on: | |
workflow_dispatch: | |
inputs: | |
psmdb: | |
description: "psmdb docker image" | |
required: false | |
pbm_branch: | |
description: "pbm branch" | |
required: false | |
go_ver: | |
description: "golang version" | |
required: false | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
strategy: | |
fail-fast: false | |
matrix: | |
test: [logical, physical, incremental, external, load] | |
env: | |
PSMDB: ${{ github.event.inputs.psmdb || 'percona/percona-server-mongodb' }} | |
PBM_BRANCH: ${{ github.event.inputs.pbm_branch || 'dev' }} | |
GO_VER: ${{ github.event.inputs.go_ver || 'bullseye' }} | |
MAKE_TARGET: 'build-cover' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup environment with PSMDB ${{ env.PSMDB }} and PBM branch ${{ env.PBM_BRANCH }} | |
run: | | |
docker compose build | |
docker compose up -d | |
working-directory: ./pbm-functional/pytest | |
- name: Test ${{ matrix.test }} backup/restore on PSMDB ${{ env.PSMDB }} PBM branch ${{ env.PBM_BRANCH }} | |
run: | | |
docker compose run --rm test pytest -s --junitxml=junit.xml -k ${{ matrix.test }} || true | |
docker compose run --rm golang_reports cp -r /gocoverdir/reports /test | |
sudo chmod -R 777 reports | |
working-directory: ./pbm-functional/pytest | |
- name: Archive reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports-${{ matrix.test }} | |
path: pbm-functional/pytest/reports/ | |
coverage: | |
env: | |
PBM_BRANCH: ${{ github.event.inputs.pbm_branch || 'dev' }} | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all reports | |
uses: actions/download-artifact@v4 | |
with: | |
path: reports | |
pattern: reports-* | |
merge-multiple: true | |
- name: Pull golang image | |
run: | | |
docker pull golang | |
- name: Print func coverage for PBM branch ${{ env.PBM_BRANCH }} | |
run: | | |
docker run -v .:/test --rm golang go tool covdata func -i /test/reports | |
- name: Print percent coverage for PBM branch ${{ env.PBM_BRANCH }} | |
run: | | |
docker run -v .:/test --rm golang go tool covdata percent -i /test/reports |