Skip to content

Commit

Permalink
action: build, test and report test results (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Nov 2, 2022
1 parent feb76d5 commit 433dca8
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/test-reporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
## Workflow to process the JUnit test results and add a report to the checks.
name: Test Report
on:
workflow_run:
workflows:
- test
types:
- completed

jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226
with:
artifact: test-results # artifact name
name: JUnit Tests # Name of the check run which will be created
path: "**/*.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run build
run: make build

- name: Run test
run: make test

- name: Store test results
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-results
path: target/*.xml

0 comments on commit 433dca8

Please sign in to comment.