Skip to content

Commit

Permalink
Configure CI (no. 144)
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed Jun 10, 2021
1 parent 02cb95d commit 95d0e17
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
testResultsFiles: $(DOTVVM_ROOT)/artifacts/test/**/*.trx
buildConfiguration: $(BUILD_CONFIGURATION)
testRunTitle: Linux
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(DOTVVM_ROOT)/artifacts/test/**/*.xml
buildConfiguration: $(BUILD_CONFIGURATION)
testRunTitle: Linux-JS

- job: testWindows
displayName: Run tests on Windows
Expand Down Expand Up @@ -65,3 +71,9 @@ jobs:
testResultsFiles: $(DOTVVM_ROOT)\artifacts\test\**\*.trx
buildConfiguration: $(BUILD_CONFIGURATION)
testRunTitle: Windows
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(DOTVVM_ROOT)\artifacts\test\**\*.xml
buildConfiguration: $(BUILD_CONFIGURATION)
testRunTitle: Windows-JS
17 changes: 16 additions & 1 deletion ci/linux/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

PROGRAM='DotVVM Linux CI'
SHORTOPTS='-h'
LONGOPTS='help,no-all,no-npm-build,no-sln-restore,no-sln-build,no-unit-tests,no-ui-tests'
LONGOPTS='help,no-all,no-npm-build,no-sln-restore,no-sln-build,no-unit-tests,no-js-tests,no-ui-tests'
TEMP=$(getopt -o "$SHORTOPS" -l "$LONGOPTS" -n "$PROGRAM" -- "$@")
if [ $? -ne 0 ]; then
exit 1
Expand All @@ -18,6 +18,7 @@ NPM_BUILD=1
SLN_RESTORE=1
SLN_BUILD=1
UNIT_TESTS=1
JS_TESTS=1
UI_TESTS=1

while true; do
Expand All @@ -31,6 +32,7 @@ Options:
--no-sln-restore Don't restore NuGet packages.
--no-sln-build Don't build ~/ci/linux/Linux.sln.
--no-unit-tests Don't run the Framework tests.
--no-js-tests Don't run Framework's Jest tests.
--no-ui-tests Don't run the AspNetCoreLatest tests.
EOF
shift
Expand All @@ -56,6 +58,11 @@ EOF
shift
continue
;;
'--no-js-tests')
JS_TESTS=0
shift
continue
;;
'--no-ui-tests')
UI_TESTS=0
shift
Expand All @@ -66,6 +73,7 @@ EOF
SLN_RESTORE=0
SLN_BUILD=0
UNIT_TESTS=0
JS_TESTS=0
UI_TESTS=0
shift
continue
Expand Down Expand Up @@ -175,6 +183,13 @@ if [ $UNIT_TESTS -eq 1 ]; then
--collect \"Code Coverage\""
fi

if [ $JS_TESTS -eq 1 ]; then
run_named_command "js tests" \
"cd \"$ROOT/src/DotVVM.Framework\" \
&& npx jest --ci --reporters=\"jest-junit\" \
&& cp ./junit.xml \"$TEST_RESULTS_DIR/js-test-results.xml\" \
&& cd \"$ROOT\""

if [ $UI_TESTS -eq 1 ]; then
killall Xvfb dotnet 2>/dev/null
rm /tmp/.X*-lock
Expand Down

0 comments on commit 95d0e17

Please sign in to comment.