Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nightwatch checks reports and CI/Checks improvments #1026

Merged
merged 132 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
e56d4d0
chore: adding nightwatch screenshots
bolt-bot Nov 29, 2018
a8cf89f
feat: initial nightwatch.js refactor work; adding support for split t…
bolt-bot Nov 29, 2018
1978e81
Merge branch 'master' of https://github.com/bolt-design-system/bolt
bolt-bot Nov 29, 2018
f9a229f
Merge branch 'master' into feature/nightwatch-testing
bolt-bot Nov 29, 2018
2a6ace7
fix: disable mandatory e2e testing on local push for now
bolt-bot Nov 29, 2018
5ed26db
fix: fix prettier issues
bolt-bot Nov 29, 2018
70d49c0
fix: fix typo
bolt-bot Nov 29, 2018
3f6c861
fix: removing old code
bolt-bot Nov 29, 2018
1817107
feat: add get-latest-deploy script
EvanLovely Jan 7, 2019
45ec6bb
chore: adjust ci paths
EvanLovely Jan 7, 2019
a0935cf
fix: add error catcher to bash getLatestDeploy
joekarasek Jan 8, 2019
b4ab115
chore: fix var captilization and add a few more checks
EvanLovely Jan 8, 2019
80a6289
chore: setup early response in CI
EvanLovely Jan 8, 2019
b48418d
chore: CI inspect
EvanLovely Jan 8, 2019
1307fcc
Merge branch 'master' into feature/nightwatch-testing - accepting mas…
joekarasek Jan 8, 2019
3e75324
chore: manually adding package.json changes from this branch back in
joekarasek Jan 8, 2019
43c11e3
chore: ci basic nightwatch test
joekarasek Jan 8, 2019
980faab
chore: add yarn install to nightwatch test
joekarasek Jan 8, 2019
a0dadb0
fix: yarn install required packages in travis build
joekarasek Jan 8, 2019
cbbf282
testing
joekarasek Jan 8, 2019
3c200a2
update path filter
joekarasek Jan 8, 2019
0d85ba9
limit to chrome webdriver
joekarasek Jan 8, 2019
20d5757
update chromedriver package to latest
joekarasek Jan 8, 2019
319caf1
bump chrome driver back to older version
joekarasek Jan 8, 2019
fb405bc
attempted fix for chrome hangup
joekarasek Jan 8, 2019
1946c47
bump version of chrome and chromedriver
joekarasek Jan 8, 2019
8cf727e
up verbosity
joekarasek Jan 8, 2019
7200818
chore: disable selenium server in nightwatch
EvanLovely Jan 8, 2019
d9fd395
fix: nightwatch tearDown => afterEach
EvanLovely Jan 8, 2019
58b985f
chore: nightwatch tweak
EvanLovely Jan 8, 2019
ecff5b6
re-enable ie11
joekarasek Jan 8, 2019
30da611
fix: change get-latest-deploy from bash to node.js
EvanLovely Jan 9, 2019
4022b81
chore: remove unused testing dependencies
joekarasek Jan 9, 2019
24a31de
fix: update pattern lab test to match current pl page title
joekarasek Jan 9, 2019
c2d956b
chore: remove double Promise
EvanLovely Jan 9, 2019
3d69b9d
fix travis yaml formatting
joekarasek Jan 10, 2019
6e0cd41
Merge branch 'feature/checks-api' into feature/nightwatch-checks-reports
EvanLovely Jan 10, 2019
b03991b
ci: set Nightwatch to use GitHub Checks
EvanLovely Jan 10, 2019
0d5c0f1
refactor: adjust Nightwatch results data passing
EvanLovely Jan 10, 2019
cc20cd3
refactor: Nightwatch reporting improvements
EvanLovely Jan 10, 2019
305ea28
fix: pass in passed
EvanLovely Jan 10, 2019
8e7c501
Merge branch 'feature/get-latest-deploy' into feature/nightwatch-chec…
EvanLovely Jan 10, 2019
d03a708
fix: get latest now.sh deploy for Nightwatch tests
EvanLovely Jan 10, 2019
bd63ed2
fix: remove meta flag from now deploy
EvanLovely Jan 10, 2019
383005f
set correct Check status
EvanLovely Jan 10, 2019
d729621
chore: nightwatch tweak
joekarasek Jan 10, 2019
db60179
chore: add video output for Nightwatch
EvanLovely Jan 10, 2019
9838e0f
chore: logging total tests collected
EvanLovely Jan 10, 2019
cde27af
set up nightwatch globals
EvanLovely Jan 10, 2019
d9d83bf
using global testingUrl
EvanLovely Jan 10, 2019
4a18804
global report test
EvanLovely Jan 10, 2019
dc262f1
chore: persist global data on nightwatch
joekarasek Jan 10, 2019
7fb3a48
chore: tweak nightwatch globals
joekarasek Jan 10, 2019
030f5eb
chore: adjust globals ref
EvanLovely Jan 10, 2019
2b251b8
chore: another thing has changed
joekarasek Jan 10, 2019
32d23fe
storing nightwatch result data in filesystem
EvanLovely Jan 10, 2019
fa48f4f
Merge branch 'feature/nightwatch-checks-reports' of github.com:bolt-d…
EvanLovely Jan 10, 2019
88e8412
removing old allResults approach
EvanLovely Jan 10, 2019
73729b3
chore: fix file path
EvanLovely Jan 10, 2019
4483458
chore: update to not test Chrome in headless mode to fix screenshots
sghoweri Jan 10, 2019
ce04467
chore: removing initial Nightwatch in_progress call
EvanLovely Jan 10, 2019
91f9540
style: make check run results display in markdown
joekarasek Jan 10, 2019
6c82792
feat: setup execAndReport
EvanLovely Jan 11, 2019
ad82567
chore: fix code
EvanLovely Jan 11, 2019
666054e
chore: remove temp lint paths
EvanLovely Jan 11, 2019
11b0472
Merge branch 'feature/get-latest-deploy' into feature/nightwatch-chec…
EvanLovely Jan 11, 2019
aef6ab3
feat: setup unit test report; consolidating travis jobs
EvanLovely Jan 11, 2019
e1cdf4e
chore: peaking at nightwatch results.json
EvanLovely Jan 11, 2019
4bdc3c2
ci: setting up Check queue script, using for lint and unit
EvanLovely Jan 11, 2019
782188a
chore: letting the cat nightwatch-results.json fail
EvanLovely Jan 11, 2019
1f41443
Update unit.js
EvanLovely Jan 11, 2019
630d574
replace https with fetch for saucelab results
joekarasek Jan 11, 2019
a4ecefa
more refactors
joekarasek Jan 11, 2019
474d161
fix: remove typo
joekarasek Jan 11, 2019
d2c61bb
fix: refactor promise returns
joekarasek Jan 11, 2019
f1df8e0
update sauce results call
joekarasek Jan 11, 2019
28b31ed
fix: attempt removal of extraneous call to SauceLabs
joekarasek Jan 11, 2019
675e6f5
refactor: more refactors
joekarasek Jan 11, 2019
40818b5
fix callback
joekarasek Jan 11, 2019
9e4cc5c
more fixes
joekarasek Jan 11, 2019
ab56b9e
fix: clean up reporting to github app
joekarasek Jan 11, 2019
2e6b50f
update reports formatting
joekarasek Jan 11, 2019
489b10a
a little more formatting
joekarasek Jan 11, 2019
4c4cad2
one more little formatting
joekarasek Jan 11, 2019
bc86f3e
refactor: formatting feedback
joekarasek Jan 11, 2019
024c77f
and one more formatting...
joekarasek Jan 11, 2019
8e2cd4a
remove trim()
joekarasek Jan 11, 2019
f023681
chore: tighten up setGithubAppSauceResults
EvanLovely Jan 11, 2019
b6b4b61
getting all SauceLabs assets onto Checks page
EvanLovely Jan 11, 2019
4c136cd
Merge branch 'master' into feature/nightwatch-checks-reports
EvanLovely Jan 11, 2019
efa10b4
fix: add fetch require back in
EvanLovely Jan 11, 2019
cb843eb
looking at now url
EvanLovely Jan 11, 2019
96662e1
fix: screenshot mapping
EvanLovely Jan 11, 2019
8b6aa4e
hooking up NOW_URL
EvanLovely Jan 11, 2019
6484bdd
callback tweak
EvanLovely Jan 11, 2019
7ff08f5
exporting NOW_URL env var
EvanLovely Jan 11, 2019
ab0df7d
re-adding SauceLabs job update API call
EvanLovely Jan 12, 2019
3fa4b7f
correcting NOW_URL, disabling assetNames API call
EvanLovely Jan 12, 2019
dee154a
Update nightwatch-globals.js
EvanLovely Jan 12, 2019
79ae675
adding Travis env vars to SauceLabs custom data
EvanLovely Jan 12, 2019
1bc6cfa
refactor: nightwatch files
EvanLovely Jan 12, 2019
f1a8d6a
feat: create report nightwatch results script
EvanLovely Jan 13, 2019
41685d7
ci: tweak
EvanLovely Jan 13, 2019
24fce21
ci: fix tweak
EvanLovely Jan 13, 2019
8d793f8
ci: fix
EvanLovely Jan 13, 2019
5b296ad
ci: output tweak
EvanLovely Jan 13, 2019
60c1a6a
ci: adjust formatting
EvanLovely Jan 13, 2019
054e769
ci: add images warning
EvanLovely Jan 13, 2019
496e18b
refactor: travis build file
EvanLovely Jan 13, 2019
629612f
ci: adjust report appearance for titles
EvanLovely Jan 13, 2019
26afc52
ci: pointing Nightwatch towards current NOW deploy
EvanLovely Jan 13, 2019
a35d651
ci: setting up url protocal for NOW_URL
EvanLovely Jan 13, 2019
b8ae2fe
fix: set correct video Nightwatch test url
EvanLovely Jan 13, 2019
fdc129b
fix: wrong build id being passed
EvanLovely Jan 13, 2019
7830977
hiding screenshots details
EvanLovely Jan 13, 2019
f90196b
ci: not queueing what can't be run
EvanLovely Jan 13, 2019
9e4fb8e
ci: add success/failure handles to test live site job
EvanLovely Jan 13, 2019
8394eee
fix: complete => completed
EvanLovely Jan 13, 2019
f8a94b6
ci: bumping delay after SauceLabs from 10s to 120s for image test
EvanLovely Jan 13, 2019
a7de0a8
fix: checking image urls to see if valid
EvanLovely Jan 13, 2019
a479dd4
fix: authing SauceLabs assets for GitHub Checks download
EvanLovely Jan 13, 2019
22a3ead
fix: syntax
EvanLovely Jan 13, 2019
f68548d
fix: removing auth-ed attempt at image loading
EvanLovely Jan 14, 2019
ff1ab59
refactor: download all SauceLabs images and upload to Now.sh
EvanLovely Jan 15, 2019
41c774d
chore: add all screenshots as Checks images for grid
EvanLovely Jan 15, 2019
d01be58
chore: adjust grid image caption
EvanLovely Jan 15, 2019
751a3ec
fix: reducing previous debugging sleep command
EvanLovely Jan 15, 2019
d9e7a76
fix: need to reset git repo before update-read-only-git-repos.sh
EvanLovely Jan 15, 2019
be8cfcd
Merge branch 'master' into feature/nightwatch-checks-reports
sghoweri Jan 15, 2019
34444ae
refactor: relocate docs site-specific E2E tests
sghoweri Jan 15, 2019
9ea78bf
chore: update gitignore to not pull in screenshots locally by default
sghoweri Jan 15, 2019
e1ff01d
refactor: remove original Nightwatch screenshots added; no longer nee…
sghoweri Jan 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ cache
*.psd
*.tmp

screenshots
reports/screenshots
node_modules
bower_components
vendor
Expand Down
106 changes: 70 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
sudo: required
dist: trusty
language: php
php:
- 7.1

addons:
sauce_connect: true

before_install:
- openssl aes-256-cbc -K $encrypted_4537e53f71e7_key -iv $encrypted_4537e53f71e7_iv -in scripts/bolt-design-system-bot.private-key.pem.enc -out scripts/bolt-design-system-bot.private-key.pem -d
- nvm install # version lifted from `.nvmrc`
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4
- export PATH="$HOME/.yarn/bin:$PATH"

services:
- docker

# Stages run sequentially; the jobs in them run in parallel
stages:
- build-and-deploy # lint code and docs

language: php
php:
- 7.1
- Prep
- Test Live Site
# Just an example of having a whole stage be branch conditional; see more conditions: https://docs.travis-ci.com/user/conditions-v1
# - name: Super Hard Tests
# if: branch = master

jobs:
include:
- stage: build-and-deploy
name: 'Smoke Tests'
- stage: Prep
name: 'Smoke Tests: Install, Lint, Unit'
before_script:
- phpenv config-rm xdebug.ini
- composer global require hirak/prestissimo
- yarn run setup:quick
#- node ./scripts/create-check-suite.js
script: yarn run test
cache:
yarn: true
directories:
- node_modules
- docs-site/cache

- stage: build-and-deploy
name: 'Linting'
before_script: yarn run setup:quick
script:
- yarn run lint:scss
- yarn run lint:js
- ./scripts/check-run-queue.js 'Lint'
- ./scripts/check-run-queue.js 'Unit'
script:
- ./test/lint.js
- ./test/unit.js
cache:
yarn: true
directories:
- node_modules

- stage: build-and-deploy
- stage: Prep
name: 'Build + Deploy'
# before_script:
# - phpenv config-rm xdebug.ini
Expand All @@ -54,35 +58,65 @@ jobs:
- GIT_SHA="$(git rev-parse --short HEAD)"
- docker tag boltdesignsystem/bolt boltdesignsystem/bolt:latest
- docker tag boltdesignsystem/bolt boltdesignsystem/bolt:${GIT_SHA}
- docker --log-level error push boltdesignsystem/bolt:latest
- docker --log-level error push boltdesignsystem/bolt:latest
- docker --log-level error push boltdesignsystem/bolt:${GIT_SHA}
after_script:
- ./scripts/check-run-in-progress.js 'Deploy - now.sh'
- cd scripts && npm install
- npm run deploy
- sh ./release/update-read-only-git-repos.sh
# 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 -
- ./release/update-read-only-git-repos.sh
cache:
yarn: true
directories:
- node_modules
- scripts/node_modules
- docs-site/cache
- www/pattern-lab/styleguide/js
- www/pattern-lab/styleguide/css
- www/pattern-lab/index.html

before_install:
- openssl aes-256-cbc -K $encrypted_4537e53f71e7_key -iv $encrypted_4537e53f71e7_iv -in scripts/bolt-design-system-bot.private-key.pem.enc -out scripts/bolt-design-system-bot.private-key.pem -d
- nvm install # version lifted from `.nvmrc`
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4
- export PATH="$HOME/.yarn/bin:$PATH"

# @todo: re-enable and add to a separate Travis Job for handling post-deploy tests
- stage: Test Live Site
name: 'Nightwatch End-to-End'
script:
- 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
- npx nightwatch --config nightwatch.js --env chrome,ie11
- sleep 10
- ./scripts/report-nightwatch-results.js
cache:
yarn: true
directories:
- node_modules

# addons:
# sauce_connect: true
- stage: Test Live Site
name: 'Ensure site is live'
script:
- 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 || ./scripts/check-run-failure.js 'Site is live' && exit 1
# - ./scripts/check-run-success.js 'Site is live'
- time curl -sSf "$NOW_URL" > /dev/null
after_success:
- ./scripts/check-run-success.js 'Site is live'
after_failure:
- ./scripts/check-run-failure.js 'Site is live'
cache:
yarn: true
directories:
- node_modules

# script:
# - bash ./travis.sh # time command already run inside the travis.sh script
# - npx nightwatch@0.9.20 --config nightwatch.js --env chrome,ie11
- stage: Test Live Site
name: 'Example master only job'
if: branch = master
script:
- echo "This only runs on master builds"

notifications:
email:
Expand Down
11 changes: 11 additions & 0 deletions docs-site/__tests__/homepage.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
'Bolt Docs: Verify Docs Site Compiled + Deployed': function(browser) {
const { testingUrl } = browser.globals;
console.log(`global browser url: ${testingUrl}`);
browser
.url(`${testingUrl}`)
.waitForElementVisible('.c-bolt-site', 1000)
.assert.containsText('.c-bolt-navbar__title-text', 'Bolt')
.end();
},
};
13 changes: 13 additions & 0 deletions docs-site/__tests__/pattern-lab.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
'Pattern Lab: Confirm Successful Now.sh Deploy + Pattern Lab Compiled': function(
browser,
) {
const { testingUrl } = browser.globals;
console.log(`global browser url: ${testingUrl}`);
browser
.url(`${testingUrl}/pattern-lab/index.html`)
.waitForElementVisible('.pl-c-body', 1000)
.verify.title('Pattern Lab - components-overview')
.end();
},
};
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'packages/build-tools/plugins/sass-export-data/tests',
'packages/components/bolt-button/__tests__/button-wc.test.js',
'packages/patternlab-node',
'packages/components/bolt-video/__tests__/bolt-video.e2e.js',
],
testEnvironment: 'node',
globalSetup: './jest-global-setup.js',
Expand Down
Loading