mirror of
https://github.com/rife2/bld
synced 2026-02-15 05:03:43 +01:00
Add JUnit reporter integration and update workflow steps
This commit is contained in:
parent
c537b584f2
commit
6fd3948f04
45
.github/workflows/bld.yml
vendored
45
.github/workflows/bld.yml
vendored
|
|
@ -2,6 +2,9 @@ name: bld-ci
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REPORTS_DIR: "build/test-results/test/"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -104,12 +107,24 @@ jobs:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: ./bld clean download
|
||||||
|
|
||||||
|
- name: Compile source
|
||||||
|
run: ./bld compile
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
id: tests
|
||||||
run: >-
|
run: >-
|
||||||
./bld clean download compile test
|
./bld test
|
||||||
-Dtest.postgres=true -Dtest.mysql=true -Dtest.mariadb=true -Dtest.oracle=true -Dtest.oracle-free=true
|
-Dtest.postgres=true -Dtest.mysql=true -Dtest.mariadb=true -Dtest.oracle=true -Dtest.oracle-free=true
|
||||||
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld
|
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld
|
||||||
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
||||||
|
--reports-dir=${{ env.REPORTS_DIR }}
|
||||||
|
|
||||||
|
- name: Run reporter
|
||||||
|
if: always() && steps.tests.outcome == 'failure'
|
||||||
|
run: ./bld reporter --all
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
@ -133,9 +148,19 @@ jobs:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: ./bld clean download
|
||||||
|
|
||||||
|
- name: Compile source
|
||||||
|
run: ./bld compile
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: >-
|
id: tests
|
||||||
./bld clean download compile test
|
run: ./bld test --reports-dir=${{ env.REPORTS_DIR }}
|
||||||
|
|
||||||
|
- name: Run reporter
|
||||||
|
if: always() && steps.tests.outcome == 'failure'
|
||||||
|
run: ./bld reporter --all
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
@ -162,6 +187,16 @@ jobs:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: .\bld.bat clean download
|
||||||
|
|
||||||
|
- name: Compile source
|
||||||
|
run: .\bld.bat compile
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: >-
|
id: tests
|
||||||
.\bld.bat clean download compile test
|
run: .\bld.bat test --reports-dir=${{ env.REPORTS_DIR }}
|
||||||
|
|
||||||
|
- name: Run reporter
|
||||||
|
if: always() && steps.tests.outcome == 'failure'
|
||||||
|
run: .\bld.bat reporter --all
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.extension-antlr=com.uwyn.rife2:bld-antlr4:1.4.3
|
bld.extension-antlr=com.uwyn.rife2:bld-antlr4:1.4.3
|
||||||
bld.extension-archive=com.uwyn.rife2:bld-archive:0.6.3
|
bld.extension-archive=com.uwyn.rife2:bld-archive:0.6.3
|
||||||
|
bld.extension-reporter=com.uwyn.rife2:bld-junit-reporter:0.9.2
|
||||||
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.6.3
|
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.6.3
|
||||||
bld.javaOptions=
|
bld.javaOptions=
|
||||||
bld.javacOptions=
|
bld.javacOptions=
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ package rife;
|
||||||
import rife.bld.BuildCommand;
|
import rife.bld.BuildCommand;
|
||||||
import rife.bld.Cli;
|
import rife.bld.Cli;
|
||||||
import rife.bld.dependencies.VersionNumber;
|
import rife.bld.dependencies.VersionNumber;
|
||||||
|
import rife.bld.extension.JUnitReporterOperation;
|
||||||
import rife.bld.extension.ZipOperation;
|
import rife.bld.extension.ZipOperation;
|
||||||
import rife.bld.operations.*;
|
import rife.bld.operations.*;
|
||||||
import rife.bld.publish.*;
|
import rife.bld.publish.*;
|
||||||
|
|
@ -161,6 +162,14 @@ public class BldBuild extends AbstractRife2Build {
|
||||||
zipBld();
|
zipBld();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BuildCommand(summary = "Runs the JUnit reporter")
|
||||||
|
public void reporter() throws Exception {
|
||||||
|
new JUnitReporterOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.failOnSummary(true)
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
public void publish()
|
public void publish()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
all();
|
all();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue