Bump actions/upload-artifact from 4.5.0 to 4.6.0 #676
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-all | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot/**' #avoid duplicates: only run the PR, not the commit | |
tags-ignore: | |
- 'v*' #avoids rerun existing commit on release | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub repo | |
uses: actions/checkout@v4 | |
- name: Select Java Version | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Server - Build and test (UT) | |
run: mvn package -pl server-spring -Dmaven.test.failure.ignore=false -U --no-transfer-progress | |
- name: Server - Deploy container | |
run: | | |
set -x | |
cp server-spring/target/samples-openapi-server-spring-*.jar server-spring/target/server-spring-deploy.jar | |
docker build --pull -t server-spring ./server-spring | |
docker run -d -p 8080:8080 --name server-spring --restart unless-stopped server-spring | |
sleep 5 #some time ensure server up | |
docker logs server-spring | |
- name: Java Clients - Test (IT) | |
run: mvn test -pl client-resttemplate,client-httpclient -Dmaven.test.failure.ignore=false -U --no-transfer-progress | |
- name: Netcore Client - Prepare environment | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
#Generates api with maven for unified generation | |
#Run build before test to fail if complie errors | |
- name: Netcore Client - Test (IT) | |
run: | | |
mvn generate-sources -pl client-netcore -Dmaven.test.failure.ignore=false -U --no-transfer-progress | |
echo "*** Build and test netcore client" | |
dotnet build client-netcore/client-netcore.sln | |
dotnet test --logger "trx;LogFileName=../../target/nunit-report.trx" client-netcore/client-netcore/client-netcore.csproj || exit 0 | |
- name: Netstandard Client - Test (IT) | |
run: | | |
mvn generate-sources -pl client-netstandard -Dmaven.test.failure.ignore=false -U --no-transfer-progress | |
echo "*** Build and test netstandard client" | |
dotnet build client-netstandard/client-netstandard.sln | |
dotnet test --logger "trx;LogFileName=../../target/nunit-report.trx" client-netstandard/client-netstandard-test/client-netstandard-test.csproj || exit 0 | |
#Convert net test reports to surefire junit format for unified reporting | |
- name: Net* Client - Split test reports to surefire format | |
run: | | |
dotnet tool install --global DotnetTestSplit | |
DotnetTestSplit client-netcore/target/nunit-report.trx client-netcore/target/surefire-reports | |
DotnetTestSplit client-netstandard/target/nunit-report.trx client-netstandard/target/surefire-reports | |
- if: always() | |
name: Publish test report artifacts | |
uses: actions/[email protected] | |
with: | |
name: test-reports | |
path: ./**/target/surefire-reports/ | |
- name: Publish test reports | |
if: always() | |
uses: mikepenz/[email protected] | |
with: | |
check_name: test-report | |
report_paths: '**/target/surefire-reports/TEST-*.xml' | |
fail_on_failure: 'true' |