Skip to content

Commit

Permalink
Copy all surefire reports to the uploaded archive.
Browse files Browse the repository at this point in the history
Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Aug 9, 2023
1 parent b0e68f8 commit 1806048
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: failure()
with:
name: surefire-reports
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- name: Upload server logs
uses: actions/upload-artifact@v3
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-wildfly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
if: failure()
with:
name: surefire-reports
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- name: Upload server logs
uses: actions/upload-artifact@v3
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.wildfly-version }}
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.wildfly-version }}
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wildfly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- name: Upload server logs
uses: actions/upload-artifact@v3
if: failure()
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.wildfly-version }}
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/'
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Optional;
import java.util.function.Supplier;

import org.jboss.resteasy.resteasy_jaxrs.i18n.LogMessages;
import org.jboss.resteasy.spi.util.Functions;

/**
Expand Down Expand Up @@ -126,8 +127,17 @@ protected static <T> T getProperty(final String name, final Class<T> returnType,
}

private static <T> Optional<T> getProperty(final String name, final Class<T> returnType) {
return ConfigurationFactory.getInstance()
.getConfiguration()
.getOptionalValue(name, returnType);
// If the MicroProfile Config is available, we might not have Converters for these types. If an error occurs
// attempting to get the value, log it, but return an empty optional.
try {
return ConfigurationFactory.getInstance()
.getConfiguration()
.getOptionalValue(name, returnType);
} catch (SecurityException e) {
throw e;
} catch (Exception e) {
LogMessages.LOGGER.tracef(e, "Failed to get property for %s of type %s.", name, returnType);
}
return Optional.empty();
}
}

0 comments on commit 1806048

Please sign in to comment.