try to publish test result summary #84
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
checks: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repo | |
uses: actions/checkout@v4 | |
with: | |
path: main | |
- name: Checkout common build repo | |
uses: actions/checkout@v4 | |
with: | |
repository: orppst/build-logic | |
path: build-logic | |
- name: Checkout common lib | |
uses: actions/checkout@v4 | |
with: | |
repository: orppst/pst-lib | |
path: pst-lib | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
with: | |
build-root-directory: main | |
cache-disabled: true | |
cache-overwrite-existing: true | |
- name: Run Gradle build | |
working-directory: ./main | |
run: ./gradlew -U build -x test | |
- name: Upload interface definition | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
# Artifact name | |
name: openapi | |
# A file, directory or wildcard pattern that describes what to upload | |
path: ./main/build/generated/openapi/openapi.yaml | |
- name: Run Gradle test | |
working-directory: ./main | |
run: ./gradlew --info test | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: | | |
main/build/test-results/**/*.xml | |