actions testing #21
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: HMDA Unit Tests | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Install sbt | |
run: brew install sbt | |
- name: Run data-browser Tests | |
run: | | |
sbt "project data-browser" "testOnly -- -l actions-ignore" 2>&1 | tee -a log-file | |
continue-on-error: true | |
- name: Check Test Results | |
run: | | |
if [ $(cat log-file | grep -E "TEST FAILED|TESTS FAILED|Failed tests" | wc -l) -gt 0 ]; then | |
echo "Unit tests failed." | |
exit 1 | |
else | |
echo "Unit tests passed." | |
fi |