From cc25f20261f3584ad3beb690a63e73bb203c102f Mon Sep 17 00:00:00 2001 From: vitekkor Date: Sat, 22 Apr 2023 16:32:15 +0300 Subject: [PATCH 1/3] #30: fix error "Only pull requests and pushes are supported, workflow_dispatch not supported." --- .github/workflows/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b432e71..d78a7c4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -28,6 +28,7 @@ jobs: - name: Add coverage to PR id: jacoco uses: madrapps/jacoco-report@v1.3 + if: ${{ github.event_name == 'pull_request' }} with: paths: ${{ github.workspace }}/blockchain/build/reports/jacoco/test/jacocoTestReport.xml token: ${{ secrets.GITHUB_TOKEN }} From ebe5974bc793593fe18c8b0abda19139c518473c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:37:54 +0000 Subject: [PATCH 2/3] Autogenerated JaCoCo coverage badges --- .github/badges/branches.svg | 1 + .github/badges/jacoco.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 .github/badges/branches.svg create mode 100644 .github/badges/jacoco.svg diff --git a/.github/badges/branches.svg b/.github/badges/branches.svg new file mode 100644 index 0000000..af922f6 --- /dev/null +++ b/.github/badges/branches.svg @@ -0,0 +1 @@ +branches72.8% \ No newline at end of file diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg new file mode 100644 index 0000000..6c03ef0 --- /dev/null +++ b/.github/badges/jacoco.svg @@ -0,0 +1 @@ +coverage68.6% \ No newline at end of file From 7016b4269901aceb80a55c2e707b77fd08961ccf Mon Sep 17 00:00:00 2001 From: vitekkor Date: Sat, 22 Apr 2023 16:43:59 +0300 Subject: [PATCH 3/3] #30: add condition for branch --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d78a7c4..39f42ac 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -43,7 +43,7 @@ jobs: generate-branches-badge: true jacoco-csv-file: blockchain/build/reports/jacoco/test/jacocoTestReport.csv - name: Commit and push the badge (if it changed) - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' && github.ref != 'refs/heads/master'}} uses: EndBug/add-and-commit@v7 with: default_author: github_actions