Created
October 9, 2019 22:15
-
-
Save mcsf/3c5d896f55d0426d7530cd2290266ecc to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
TEST_SUITE="change-detection" | |
TEST_NAME="consecutive edits" | |
E2E_PATCH="bisect-e2e.diff" | |
skip() { | |
echo Skipping: $@; exit 125 | |
} | |
# Setup | |
git checkout -f || skip Failed initial checkout | |
git apply $E2E_PATCH || skip Failed patch application | |
## Faster but more error-prone: | |
#npm i || skip Failed installation | |
# Slower but more reliable: | |
npm ci || skip Failed installation | |
npm run build || skip Failed build | |
# Test | |
# nom run test-e2e would be more reliable, but much slower, so instead: | |
FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD= $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath packages/e2e-tests/specs/$TEST_SUITE.test.js -t "$TEST_NAME" | |
ERROR=$? | |
# Cleanup | |
git checkout -f || skip Failed cleanup | |
# Exit, reporting test status | |
exit $ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment