diff --git a/.github/workflows/gradle-release.yml b/.github/workflows/gradle-release.yml index 46995c4..5ab1763 100644 --- a/.github/workflows/gradle-release.yml +++ b/.github/workflows/gradle-release.yml @@ -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 @@ -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 }} \ No newline at end of file + build/test-results/**/*.xml + build/test-results/**/*.trx + build/test-results/**/*.json \ No newline at end of file diff --git a/src/test/java/ZLinterTest.java b/src/test/java/ZLinterTest.java index 82d84e6..d7a846d 100644 --- a/src/test/java/ZLinterTest.java +++ b/src/test/java/ZLinterTest.java @@ -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()); }