Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable testspace #310

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions .github/workflows/microshed-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: MicroShed CI

on:
push:
branches:
- main
pull_request:
branches:
- main
- main
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.gitignore'
Expand All @@ -18,27 +20,27 @@ env:
LANG: en_US.UTF-8
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ 11 ]
fail-fast: false
max-parallel: 4

runs-on: ${{ matrix.os }}
name: Build ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Java
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew assemble testClasses
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew assemble testClasses
integration_tests:
name: Tests - ${{matrix.category}}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,12 +73,15 @@ jobs:
wildfly-app
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Java
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- uses: testspace-com/setup-testspace@ee1482f978eb5010ec27b6f6372904f01f2edd68 # v1.0.6
if: ${{ github.event_name == 'push' }}
with:
domain: ${{github.repository_owner}}
- name: Run integration tests
shell: bash
env:
Expand All @@ -85,6 +90,8 @@ jobs:
run: |
chmod +x gradlew
echo "org.gradle.daemon=false" >> gradle.properties

mkdir results

echo "Will be running projects $TEST_PROJECTS"
for TEST_PROJECT in $TEST_PROJECTS
Expand All @@ -95,7 +102,22 @@ jobs:
fi
echo "### BEGIN running test project $TEST_PROJECT"
./gradlew :microshed-testing-$TEST_PROJECT:test
echo "### END running test project $TEST_PROJECT";
echo "### END running test project $TEST_PROJECT";

#Gradle test results
if [[ -d "sample-apps/$TEST_PROJECT/build/test-results/test/" ]]; then
cp sample-apps/$TEST_PROJECT/build/test-results/test/TEST-*.xml results/
fi

#Maven test results
if [[ -d "sample-apps/$TEST_PROJECT/target/test-failsafe-reports/" ]]; then
cp sample-apps/$TEST_PROJECT/target/test-failsafe-reports/TEST-*.xml results/
fi

done

echo "Done running all tests."
echo "Done running all tests, results folder contains:"
ls -la results/
- name: Upload test results
if: ${{ github.event_name == 'push' }}
run: testspace "[ ${{ matrix.category }} ]results/TEST-*.xml"