mirror of
https://github.com/rife2/bld
synced 2026-03-11 22:14:09 +01:00
Add JUnit reporter integration and update workflow steps
This commit is contained in:
parent
32c400bcc8
commit
1c7ca84156
41
.github/workflows/bld.yml
vendored
41
.github/workflows/bld.yml
vendored
|
|
@ -104,13 +104,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 }}
|
||||||
|
|
||||||
|
- 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 +144,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
|
||||||
|
|
||||||
|
- 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 +183,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
|
||||||
|
|
||||||
|
- name: Run reporter
|
||||||
|
if: always() && steps.tests.outcome == 'failure'
|
||||||
|
run: .\bld.bat reporter --all
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@ 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-SNAPSHOT
|
||||||
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=
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
|
||||||
bld.sourceDirectories=core/src/bld/java
|
bld.sourceDirectories=core/src/bld/java
|
||||||
bld.version=2.3.0
|
bld.version=2.3.0
|
||||||
|
|
@ -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.*;
|
||||||
|
|
@ -110,6 +111,8 @@ public class BldBuild extends AbstractRife2Build {
|
||||||
.signPassphrase(property("sign.passphrase")))
|
.signPassphrase(property("sign.passphrase")))
|
||||||
.artifacts(
|
.artifacts(
|
||||||
new PublishArtifact(zipBldOperation.destinationFile(), "", "zip"));
|
new PublishArtifact(zipBldOperation.destinationFile(), "", "zip"));
|
||||||
|
|
||||||
|
testOperation().testToolOptions().reportsDir(new File("build/test-results/test/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
final ZipOperation zipBldOperation = new ZipOperation();
|
final ZipOperation zipBldOperation = new ZipOperation();
|
||||||
|
|
@ -161,6 +164,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