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

Build and run tests on different OS's #143

Merged
merged 2 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
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
39 changes: 28 additions & 11 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Build and test
on:
pull_request: { }
jobs:
build:
runs-on: ubuntu-20.04
build-and-test:
name: Run tests on ${{ matrix.os }}
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]

steps:
- name: Checkout
Expand All @@ -25,19 +31,30 @@ jobs:

- name: Build
id: build
run: mvn -B -U -Dsurefire.rerunFailingTestsCount=5 clean install
run: mvn -B -U "-Dsurefire.rerunFailingTestsCount=5" clean install

- name: Archive Test Results on Failure
uses: actions/upload-artifact@v2
if: failure()
if: always()
with:
name: test-results
name: Unit Test Results ${{ matrix.os }}
path: target/surefire-reports/
retention-days: 7

- name: Publish Unit Test Results
id: publish
uses: EnricoMi/[email protected]
if: failure()
with:
files: target/surefire-reports/*.xml
publish-test-results:
name: Publish Unit Test Results
runs-on: ubuntu-latest
needs: build-and-test
if: always()

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts

- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
with:
files: artifacts/**/*.xml

Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static void increaseTime(final InMemoryEngine engine, final Duration dura
engine.increaseTime(duration);
try {
// we need to wait some physical time so that InMemoryEngine has a chance to fire the timers
Thread.sleep(50);
Thread.sleep(100);
} catch (InterruptedException e) {
// do nothing
}
Expand Down