https://github.com/jeantessier/test-summary-action
A GitHub Action to summarize JUnit tests in Gradle builds
https://github.com/jeantessier/test-summary-action
github-actions ruby
Last synced: 6 months ago
JSON representation
A GitHub Action to summarize JUnit tests in Gradle builds
- Host: GitHub
- URL: https://github.com/jeantessier/test-summary-action
- Owner: jeantessier
- License: mit
- Created: 2024-07-03T06:31:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-24T03:29:15.000Z (over 1 year ago)
- Last Synced: 2025-03-26T09:04:38.249Z (over 1 year ago)
- Topics: github-actions, ruby
- Language: Ruby
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# test-summary-action
A GitHub Action to summarize JUnit tests in Gradle builds.
It collects JUnit results from each subproject and reports on tests passed and
failed for each subproject. The report is a simple table written to the
`GITHUB_STEP_SUMMARY`.
## To Use
Here is an example workflow as an example of using this GitHub Action in a job's
steps.
```yaml
jobs:
build:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Summarize tests results
uses: jeantessier/test-summary-action@v1
if: ${{ always() }}
```
It uses `if: ${{ always() }}` so it can report on failed tests, which would make
the previous step fail.
It will produce a summary table like the following.
| Subproject | Status | Tests | Passed | Skipped | Failures | Errors |
|-------------------|:------------------:|:-----:|:------:|:-------:|:--------:|:------:|
| integration-tests | :white_check_mark: | 714 | 714 | 0 | 0 | 0 |
| lib | :x: | 2250 | 2248 | 0 | 2 | 0 |
| webapp | :white_check_mark: | 72 | 0 | 72 | 0 | 0 |