diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19bee2223d..d0879e7925 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,9 +142,16 @@ jobs: id: electron-unit-tests run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" --coverage - - name: Run Extension Unit Tests # {{SQL CARBON EDIT}} Rename to core for clarity - id: electron-extension-unit-tests + - name: Run Extension Unit Tests (Continue on Error) # {{SQL CARBON EDIT}} Run extension unit tests (continue on error) + id: electron-extension-unit-tests-continue-on-error run: DISPLAY=:10 ./scripts/test-extensions-unit.sh + continueOnError: true + condition: and(succeeded(), eq(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false')) + + - name: Run Extension Unit Tests (Fail on Error) # {{SQL CARBON EDIT}} Run extension unit tests (fail on error) + id: electron-extension-unit-tests-fail-on-error + run: DISPLAY=:10 ./scripts/test-extensions-unit.sh + condition: and(succeeded(), ne(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false')) # {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly - name: Combine code coverage files diff --git a/build/azure-pipelines/linux/sql-product-build-linux.yml b/build/azure-pipelines/linux/sql-product-build-linux.yml index 877305b94c..5f29358cc5 100644 --- a/build/azure-pipelines/linux/sql-product-build-linux.yml +++ b/build/azure-pipelines/linux/sql-product-build-linux.yml @@ -147,8 +147,23 @@ steps: NO_CLEANUP=1 \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests" - displayName: 'Run Extension Unit Tests' - condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) + displayName: Run Extension Unit Tests (Continue on Error) + continueOnError: true + condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), eq(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false'))) + + - script: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the unit tests + # to run with these builds instead of running out of sources. + set -e + APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 + APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") + INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ + NO_CLEANUP=1 \ + VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ + DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests" + displayName: Run Extension Unit Tests (Fail on Error) + condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false'))) - bash: | set -e