Skip to content

Commit

Permalink
workflow fixed
Browse files Browse the repository at this point in the history
added publish test report
  • Loading branch information
Moieen Abbas committed May 23, 2024
1 parent 6199be8 commit 7db651a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
65 changes: 25 additions & 40 deletions .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ on:
types: [ created ]

jobs:
build_linux:
runs-on: ubuntu-latest
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]

permissions:
contents: write
packages: write
checks: write
pull-requests: write

steps:
- name: Check out source code
Expand Down Expand Up @@ -57,53 +58,37 @@ jobs:
with:
files: build/libs/*.jar

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_window:
runs-on: windows-latest

publish-test-results:
name: "Publish Tests Results"
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
checks: write

# only needed unless run with comment_mode: off
pull-requests: write

steps:
- name: Check out source code
uses: actions/checkout@v4
# only needed for private repository
# contents: read

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: 'gradle'
cache-dependency-path: | # optional
*.gradle*
**/gradle-wrapper.properties
# only needed for private repository
# issues: read
if: always()

- name: Gradle Build started
run: ./gradlew clean build --no-daemon
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test-results\**\*.xml
test-results\**\*.trx
test-results\**\*.json
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
build/test-results/**/*.xml
build/test-results/**/*.trx
build/test-results/**/*.json
2 changes: 1 addition & 1 deletion src/test/java/ZLinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void testValid() {
try {
lintResult = ZLinter.lint(new File(ZLinterTest.class.getResource("./www_sc_com.cer").getPath()).toString(), ZLinter.Format.pem);
} catch (ZLintException e) {
System.out.println(e.getMessage());
System.err.println(e.getMessage());
e.printStackTrace();
Assertions.fail(e.getMessage());
}
Expand Down

0 comments on commit 7db651a

Please sign in to comment.