Skip to content

Commit

Permalink
Update CI settings
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Dec 15, 2022
1 parent ec4db63 commit c2738fe
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
25 changes: 19 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ jobs:
steps:
- checkout

- run: sed -i "s|JDK_home|$JAVA_HOME|g" ci-toolchains.xml
- run:
name: Adjusting toolchain
command: sed -i "s|JDK_home|$JAVA_HOME|g" ci-toolchains.xml

# run tests!
- run: mvn --batch-mode test jacoco:report -t ci-toolchains.xml
- run:
name: Running tests
command: mvn --batch-mode test jacoco:report -t ci-toolchains.xml

# check test results
- run: sh src/main/config/checktests.sh
- run:
name: Checking test results
command: sh src/main/config/checktests.sh

# update codecov
- run: bash <(curl -s https://codecov.io/bash)
- run:
name: Refreshing code coverage
command: bash <(curl -s https://codecov.io/bash)

deployment:
docker:
Expand All @@ -43,10 +51,15 @@ jobs:
steps:
- checkout

- run: sed -i "s|JDK_home|$JAVA_HOME|g" ci-toolchains.xml
- run:
name: Adjusting toolchain
command: sed -i "s|JDK_home|$JAVA_HOME|g" ci-toolchains.xml

# run deployment!
- run: mvn --batch-mode deploy -Dmaven.test.skip -DcreateDocs=true -s settings.xml -t ci-toolchains.xml
- run:
name: Deploying snapshot
command: mvn --batch-mode deploy -Dmaven.test.skip -DcreateDocs=true -s settings.xml -t ci-toolchains.xml

workflows:
version: 2
build_deploy:
Expand Down
14 changes: 7 additions & 7 deletions src/main/config/checktests.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh
find ~/repo/./target/surefire-reports -iname "*.txt" -exec grep -Li "Failures: 0" {} \+
number_of_failures=`grep -L -r -i "Failures: 0" ~/repo/./target/surefire-reports/*.txt | wc -l`
#if [ "$number_of_failures" -ne "0" ]; then
# echo $number_of_failures files with failures.
# exit 2
#fi
number_of_errors=`grep -L -r -i "Errors: 0" ~/repo/./target/surefire-reports/*.txt | wc -l`
# find ~/repo/./target/surefire-reports -iname "*.txt" -exec grep -Li "Failures: 0" {} \+
number_of_failures=`grep -L -r -i "Failures: 0" ~/repo/./target/surefire-reports/*Test.txt | wc -l`
if [ "$number_of_failures" -ne "0" ]; then
echo $number_of_failures files with failures.
exit 2
fi
number_of_errors=`grep -L -r -i "Errors: 0" ~/repo/./target/surefire-reports/*Test.txt | wc -l`
if [ "$number_of_errors" -ne "0" ]; then
echo $number_of_errors files with errors.
exit 2
Expand Down

0 comments on commit c2738fe

Please sign in to comment.