Skip to content

Commit

Permalink
Merge pull request #1103 from bolt-design-system/fix/split-travis-uni…
Browse files Browse the repository at this point in the history
…t-and-link-tests

Fix: Update Travis Config to Fix Silent Unit / Lint Test Failures
  • Loading branch information
sghoweri authored Mar 11, 2019
2 parents a443168 + 4f98496 commit 1e469ee
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 48 deletions.
70 changes: 54 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,36 @@ stages:
jobs:
include:
- stage: Prep
name: 'Smoke Tests: Install, Lint, Unit'
before_script:
- phpenv config-rm xdebug.ini
- composer global require hirak/prestissimo
- travis_retry yarn run setup:quick
- ./scripts/check-run-queue.js 'Lint'
- ./scripts/check-run-queue.js 'Unit'
script:
- ./test/lint.js
- ./test/unit.js
name: 'Smoke Tests: Linting'
install: travis_retry yarn run setup:quick
before_script: ./scripts/check-run-queue.js 'Lint'
script: yarn run lint
after_success: ./scripts/check-run-success.js 'Lint'
after_failure: ./scripts/check-run-failure.js 'Lint'
cache:
yarn: true
directories:
- node_modules
- docs-site/vendor
- packages/core-php/vendor
- packages/twig-renderer/vendor
- packages/drupal-twig-extensions/vendor

- stage: Prep
name: 'Smoke Tests: Unit Tests (Jest)'
install: travis_retry yarn run setup:quick
before_script: ./scripts/check-run-queue.js 'Unit'
script: yarn run test
after_success: ./scripts/check-run-success.js 'Unit'
after_failure: ./scripts/check-run-failure.js 'Unit'
cache:
yarn: true
directories:
- node_modules
- docs-site/vendor
- packages/core-php/vendor
- packages/twig-renderer/vendor
- packages/drupal-twig-extensions/vendor

- stage: Prep
name: 'Build + Deploy'
Expand All @@ -47,14 +67,20 @@ jobs:
# need to reset git repo before `update-read-only-git-repos.sh`
- cd "`git rev-parse --show-toplevel`" && git clean -fd && git reset --hard HEAD && cd -
- ./scripts/release/update-read-only-git-repos.sh
cache:
yarn: true
directories:
- node_modules
- docs-site/vendor
- packages/core-php/vendor
- packages/twig-renderer/vendor
- packages/drupal-twig-extensions/vendor

- stage: Test Live Site
name: 'Nightwatch End-to-End'
# addons:
# sauce_connect: true
install: travis_retry yarn run setup
before_script: ./scripts/check-run-in-progress.js 'Nightwatch'
script:
- travis_retry yarn run setup
- ./scripts/check-run-in-progress.js 'Nightwatch'
- export NOW_URL=$(./scripts/get-latest-deploy.js)
- echo "The Now URL is $NOW_URL"
- time curl -sSf "$NOW_URL" > /dev/null # warming up site
Expand All @@ -64,12 +90,20 @@ jobs:
after_success:
- ./scripts/deploy-branch-alias.js
- ./scripts/deploy-tagged-release.js
cache:
yarn: true
directories:
- node_modules
- docs-site/vendor
- packages/core-php/vendor
- packages/twig-renderer/vendor
- packages/drupal-twig-extensions/vendor

- stage: Test Live Site
name: 'Ensure site is live'
install: travis_retry yarn run setup
before_script: ./scripts/check-run-in-progress.js 'Site is live'
script:
- travis_retry yarn run setup
- ./scripts/check-run-in-progress.js 'Site is live'
- export NOW_URL=$(./scripts/get-latest-deploy.js)
- echo "Testing Now URL \"$NOW_URL\" to see if it is alive."
- time curl -sSf "$NOW_URL" > /dev/null
Expand All @@ -81,6 +115,10 @@ jobs:
yarn: true
directories:
- node_modules
- docs-site/vendor
- packages/core-php/vendor
- packages/twig-renderer/vendor
- packages/drupal-twig-extensions/vendor

- stage: Test Live Site
name: 'Example master only job'
Expand Down
16 changes: 0 additions & 16 deletions test/lint.js

This file was deleted.

16 changes: 0 additions & 16 deletions test/unit.js

This file was deleted.

0 comments on commit 1e469ee

Please sign in to comment.