-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (47 loc) · 1.98 KB
/
ci-report.yml
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
49
50
51
52
53
54
55
name: 'Continuous Integration - Report'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test-report:
permissions:
contents: write
name: Report Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
steps:
- uses: actions/checkout@v3
- name: Download and Extract Artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mvn -B org.liquibase.ext:liquibase-sdk-maven-plugin:0.10.20:install-snapshot-cli "-Dliquibase.sdk.branchSearch=master" "-Dliquibase.sdk.allowInstall=true" "-Dliquibase.sdk.liquibaseHome=bin" "-Dliquibase.sdk.github.token=$GITHUB_TOKEN"
mvn -B liquibase-sdk:download-snapshot-artifacts \
-Dliquibase.sdk.repo=${{ github.repository }} \
-Dliquibase.sdk.runId=${{ github.event.workflow_run.id }} \
-Dliquibase.sdk.downloadDirectory=artifacts \
-Dliquibase.sdk.artifactPattern=* \
-Dliquibase.sdk.unzipArtifacts=true
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
junit_files: "artifacts/test-reports-*/**/*.xml"
build-testing-comment:
name: Add Build Testing Comment
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch != 'main'
steps:
- uses: actions/checkout@v3
- name: Create "BUILD_TESTING" comment
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mvn -B liquibase-sdk:set-pull-request-comment \
-Dliquibase.sdk.repo=${{ github.repository }} \
-Dliquibase.sdk.pr.newComment=BUILD_TESTING \
-Dliquibase.sdk.pr.definition=${{ github.event.workflow_run.head_branch }}