diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dacaf697..01b0b2827 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -229,7 +229,11 @@ jobs: command: mv ./dist-test ./dist - run: name: test:e2e:chrome - command: yarn test:e2e:chrome + command: | + if .circleci/scripts/test-run-e2e + then + yarn test:e2e:chrome + fi no_output_timeout: 20m - store_artifacts: path: test-artifacts @@ -250,7 +254,11 @@ jobs: command: mv ./dist-test ./dist - run: name: test:e2e:firefox - command: yarn test:e2e:firefox + command: | + if .circleci/scripts/test-run-e2e + then + yarn test:e2e:firefox + fi no_output_timeout: 20m - store_artifacts: path: test-artifacts diff --git a/.circleci/scripts/test-run-e2e b/.circleci/scripts/test-run-e2e new file mode 100755 index 000000000..ff2371234 --- /dev/null +++ b/.circleci/scripts/test-run-e2e @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +# Skip running e2e tests if the HEAD commit is tagged correctly +if git show --format='%B' --no-patch "$CIRCLE_SHA1" | grep --fixed-strings --quiet '[skip e2e]' +then + printf '%s\n' "$CIRCLE_SHA1 contains the tag '[skip e2e]' so e2e tests will not run" + exit 1 +fi + +exit 0