Commit Graph

237 Commits

Author SHA1 Message Date
Ben Kucera
fbd523615e [internal] Lint typescript, json, new eslint rules (#4449)
* temp 07/01/19 [skip ci] main lint files

* use lint-staged scripts

* fix all auto-fixable eslint errors

* manually fix lint issues in files

* temp 07/01/19 [skip ci]

* bump eslint plugin versions, update circle.yml

* [lint fix] remaining js files

* update vscode/settings.json

* add back stop-only

* use stop-only for linting .onlys

* fix verify_spec, build_spec

* update json plugin

* relint & apply corrections

* fix appveyor.yml not cleansing env vars (very bad)

* dont echo commit message in appveyor script

* retry build &

* re-add & upgrade lint-staged

* update contributing docs

* only let stop-only catch staged changes
2019-07-12 13:59:44 -04:00
Gleb Bahmutov
273f9e1707 chore: rework pre-release commit comment 2019-07-10 13:00:48 -04:00
Gleb Bahmutov
c57d302176 Verify downloaded test runner zip file 812 (#4193)
* if download has checksum use it to verify downloaded file

* check only filesize if no checksum available

* add download tests

* move checksum into util for reuse, be explicit

* add comments explaining headers used to verify checksum

* move hasha to dev dependency

* remove unnecessary function

* do not use deprecated Promise.join with spread

* fix promise join callback

* linting
2019-07-09 14:03:00 -04:00
Jennifer Shehane
13b5a0acda Prefer American spelling 'canceled' (#4676) 2019-07-09 21:15:04 +06:30
Gleb Bahmutov
e338e23e5a Add comment how to install pre-release version (#4647)
* WIP: post install message on commit

* linting

* finish message contents

* linting

* fix npm and binary, circleci name

* comment on CI build on AppVeyor

* remove extra build branches
2019-07-08 12:10:13 -04:00
Zach Bloomquist
178e9bf0ab Warn when Cypress detects policies that may interfere with auto… (#4405)
* add chrome policy check that is logged to stdout/displayed in GUI

* improve warning message

* add desktop-gui warning when launching browser

* update tests

* clean up adding warnings to browsers in the gui

* support multiple warnings in gui

* update on-link

* don't show warning in open mode

* add test for warning getting attached, add hyperlink to warning tooltip

* render tooltip warnings with markdown

* pass NO_CHECK_DEPS=1 to skip dep check

* @cypress/react-tooltip@0.5.0 - adds clickability to tooltips

* add link to issue

* dont need to update reporter and runner

* use synchronous console.log, not async errors.log for displaying yellow warnings

* use trigger, do not build up events manually

/cc @flotwig


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-07-03 15:35:58 +02:00
Gleb Bahmutov
e5106d95f5 test Mac build against other repos (#4527)
* test Mac build against other repos

* trigger projects again to confirm all work

* when triggering projects filter by platform too

* linting
2019-06-21 12:16:04 -04:00
Jennifer Shehane
c46b237061 actually require newly renamed coffeescript module (#4390)
* actually require coffeescript. 😅

* allow commit message to build binary

* test binary [build binary]
2019-06-05 12:46:39 -04:00
Gleb Bahmutov
4ebd4b6b2b use latest github commit module version, print if we have variables set 2019-05-22 10:42:09 -04:00
Ben Kucera
b6ece46c39 fix appveyor build binary only on develop branch (#4234)
* testing code for appveyor env vars

* fix appveyor env vars for branchname
06-00000026

* add comments for clarification
06-00000056
2019-05-20 12:27:43 -04:00
Zach Bloomquist
b8a6baaca3 Retry certain requests on failure (#4015)
* retry requests, basic e2e test

* basic e2e test for chrome behavior

* don't use timeouts to test

* some minor cleanup

* validate google chrome's retry behavior w/ a proxy

* get retries on network errors workin

* cleanup

* final changes before switching approach

* Reverting previous approach in request.coffee, server.coffee

* add retryOnNetworkFailure

* now works with retryOnStatusCodeFailure

* retry 4 times in addition to the 1 initial attempt

* add tests for subresources

* much improved error handling

* have the e2e test really work

* e2e baseurl check

* retry baseurl check

* remove special handling for node 8.2.1 bug

* WIP: continue making progress building out request retry

- swap out passthrough’s for pumpify / duplexify / pump
- clean up error handling / messaging / retry logic

* pipe clientrequest events

* buffer req body to disk, restore error handling/retrying

* don't bubble up errors from failed attempts

* actually pipe reqstream, oops

* add some e2e tests for request body

* revert lib/request.coffee to 7be1051

* add almost-working lazy-stream

* manually fire the 'pipe' event on the reqStream to copy headers to the outgoing message

- restore the ‘error’ propagation so that all tests pass for now

* cleanup leaking 'undefined' into stdout, causing failing e2e tests

- do not set onWarning as a property of project, just pass as an
argument

* add new options to request_spec, deduplicate default opts

* use stream buffer in request.coffee

* revert request.coffee

* last stream_buffer changes before removing fs stuff

* remove fs stuff from stream_buffer, add stream piping tests

* it works! :tada::tada:🎉 using duplexify to separate delayStream and reqBodyBuffer

* retry for .5s max on ECONNREFUSED

* add error codes

* don't timeout proxied requests

* restore baseurl check

* update new e2e tests

* make delay work with rp

* propagate clientresponse events

* removing tests that don't do anything now that we don't ESOCKETTIMEOUT on proxied requests

* add new visit, req options to index.d.ts

* don't fail on server-performance-test

* make retries with status code work again

* account for different stack trace in ci

* fix test

* retry https requests

* add tests for https passthru retries working

* clean up error handling for https-proxy

* fix failing https-proxy tests, tweak agent error handling to prevent multiple callbacks

* make expectedExitCode actual vs. expected in the correct order

* bump up e2e test timeout so it can retry and still work

* update tests

* retry up to 500ms on proxied requests

* add tests for incompatible options errors

* remove .only

* maybe this will help it act more consistently

* help e2e test work in ci

* don't reconnect on already made connections

* clarify naming

* wip: testing https proxy

* better debug calls

* WIP: getting proxy passthrough retry tests going

* handle retrying upstream proxy errors

- add tests for successfully retrying proxy errors and for unsuccessful
retries
- fix onClose errors when proxy connection is closed before enough data
is received
- fix not returning setTimeout correctly

* group related code accordingly

* do not build typescript by default, drop extension from main

* more TODO notes

* don't set a default NO_PROXY if NO_PROXY = ''

* debugging-proxy@2.0.0

* null out reqBodyBuffer when req finishes

* wip: retry in agent, not https-proxy [skip-ci]

* update https-proxy to use @packages/network retries

* retry after connection but before proxy tunnel established

* appease my linty overlords

* update https-proxy tests

* update agent specs, decided to still use tls.connect

it's easier to test and has less complexity

* test retrying HTTPS passthru

* debugging-proxy@2.0.1

* increase defaultCommandTimeout 100 -> 200 to prevent flake in CI

* auto formatting

* fix test to be dynamic and not rely on magic constants

* copy types field when linking proxy images, update packages/network types field

* linting

* add network index.js file

* linting

* improve error messaging experience when verifying base url

* only insert 1 new line

* fix failing test not binding to localhost

* removed test that's covered by e2e specs

* remove dash in 're-try'

* some cleanup for readability

* use allocUnsafe per perf

* unset NO_PROXY with an empty string

* move retry ensuring the baseUrl into url, cleanup some imperative code

* if the head is already present during connect, make connection, else wait for first head bytes

* minor formatting, clarity around conditions, naming

* rename retryInterval -> retryIntervals

* set defaults for requests during creation for clarity

* rename send -> sendPromise to pair better with sendStream

* use retryIntervals instead of juggling MAX_REQUEST_RETRIES

- ensure debug messages are consistent between request streams +
promises
- set static constants

* DRY up status check + network failure + retry logic

- keeps the debug logic identical between promises + streams
- ensures all logic paths are also consistent
- consolidates the pop’ing of intervals in a single place

* find / replace fail

* derp

* make the logic actually correct, set intervals as cloned defaults for recursive lookup

* pass arg correctly

* reduce debugging noise, formatting

* rename intervals -> delaysRemaining for clarity

* added unit tests around getDelayForRetry

* set retryIntervals as default options correctly, add unit tests


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-05-15 12:46:55 -04:00
Gleb Bahmutov
edc7b4c453 print more info when checking built version 2019-05-02 17:35:42 -04:00
Gleb Bahmutov
6f685ab8b8 add metadata to the uploaded test runner binary (#4092)
* move s3 api helpers into own TS file

* add demo file

* add comments

* add method to set user metadata by copying it

* set checksum metadata on uploaded binary

* move checksum to the right upload file

* call the right method

* fix require from ts

* convert size to string

* needs extension

* test binary against other projects

* set checksums as headers during first upload

* Revert "set checksums as headers during first upload"

This reverts commit 2043d9ee1f.

* set ACL to public-read when setting metadata on binary

* linting

* pass content-type

* update scripts tests

* linting

* add --platformArch parameter
2019-05-02 12:29:37 -04:00
Gleb Bahmutov
ebaa7a375c Copy test runner binaries before releasing new version (#4082)
* adding S3 sdk

* test binary folder

* linting

* before searching for binary

* linting

* grab folders in the given S3 prefix

* grab folders in the given S3 prefix

* find the last build

* found last builds for commit

* refactoring

* add tests for upload dir name

* create destination zip filename

* copying S3 files

* move s3 helpers into own object, prepare for testing

* add realistic test

* linting

* chore: add documentation to DEPLOY.md file
2019-05-01 10:14:25 -04:00
Gleb Bahmutov
5015cbbe87 Wrap konfig load from scripts tests to avoid changing CWD (#4067)
* chore: add utility method to get konfig from scripts tests

Local scripts specs should be be caught by the changing current
directory when loading `konfig.coffee` (which loads `cwd.coffee`,
which changes the cwd to `packages/server`). This was throwing
snapshot tests into saving into a wrong folder until I have noticed
this and fixed in
[v8.0.3](https://github.com/bahmutov/snap-shot-core/releases/tag/v8.0.3)

* linting

* add more comments
2019-04-29 17:14:38 -04:00
Zach Bloomquist
47e98fa1d0 Use 'platform-arch' naming scheme for downloads (#3998)
* use 'platform-arch' naming scheme for downloads

* do full builds for this branch

* Revert "do full builds for this branch"

This reverts commit 6d539513e7.

* update wrong comments

* chore: test upload getCDN functions

* linting js

* unit test refactored manifest

* linting
2019-04-29 12:27:41 -04:00
Chris Breiding
b8f0257958 Upgrade to electron 2.0.18 and node 8.9.3 (#4001)
* upgrade to electron 2.0.18 and node 8.9.3

* use cypress/browsers:node8.9.3-chrome73 docker image

* fix type_spec for chrome

* Revert "fix type_spec for chrome"

This reverts commit 7914f68142.

* fix driver specs for chrome

* update engines to 8.9.3


Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-04-25 19:55:15 -04:00
Gleb Bahmutov
c55cc089ef put platform and arch into commit message status object 2019-04-19 12:53:10 -04:00
Brian Mann
b1adbda0ca provide context in the status commit message 2019-04-18 08:16:16 -04:00
Brian Mann
d4b55ec820 set electron builder options directly to avoid attempting to publish and hanging in CI
- fix variable override
2019-04-18 04:27:43 -04:00
Brian Mann
2a85d6b69b whoops... retry after 5 minutes, not seconds. 2019-04-18 01:51:22 -04:00
Brian Mann
27ccf2709a retry signing the binary once if it fails 2019-04-17 21:37:52 -04:00
Gleb Bahmutov
4bcc094623 create status check after building binary (#3967)
* create status check after building binary

* rework status

* put platform first in the status check

* remove building this branch

* modify the status check context, misc cleanup


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-04-17 20:51:19 -04:00
Gleb Bahmutov
1afc5d1929 do not upload and test Windows binary on AppVeyor for PRs 2019-04-11 17:06:50 -04:00
Gleb Bahmutov
9a605c4df3 chore: put arch into test commit subject
Need both platform and arch name in the commit to the test repos.
2019-04-11 10:39:54 -04:00
Gleb Bahmutov
a793b09e38 switch to use @cypress/commit-message-install 2019-04-09 15:04:09 -04:00
Gleb Bahmutov
8968e7fc87 Add arch to commit message install (#3923)
- add `arch` and `status` fields to the commit message when testing other projects
- status is needed to enable GitHub commit status checks for this build
- renamed a couple of test jobs

Example commit message with this change in 61c24b2000

<img width="1011" alt="Screen Shot 2019-04-09 at 11 39 31 AM" src="https://user-images.githubusercontent.com/2212006/55814270-2c97ad00-5abc-11e9-8a6d-27fcec214130.png">
2019-04-09 11:56:48 -04:00
Zach Bloomquist
db752f5f93 Only package Windows builds of ffmpeg with Windows, build for win32 and win64 (#3877)
* appveyor build for this branch

* don't force install ffmpeg on windows

don't force install ffmpeg on windows

* derp

* fix

* build in appveyor

* oops

* delete using del

* use RMDIR instead of DEL

* only build 32-bit

* build for x64 and x86 windows

* separate win32 and win64

* require lodash

* make electron arch configurable

* cross-compile 32, only run in 64-bit

* force install ffmpeg if necessary

* it's all win10 x64, but we can force it to build for ia32 in x32 mode

* add windows util

* who's idea was it to make whitespace meaningful?

* pass arch to npm install, pass arch to uploader

* add TARGET_PLATFORM

* fun fact: appveyor titlecases env var names

fun fact: appveyor titlecases env var names

* fix: pass args

* use process

* cli: use arch package to send arch to server

* pass TARGET_ARCH to all npm installs

* run-all

* always call getUploadNameByOs

* use the precise version of node, enable both x64 and ia32 arch

* quotes

* uh wat

* move console logs to script because windows

* add yet another env var to install the right node arch

* use x86, not x32

* give ia32 a try, why not

* use platform env again

* and also try x86 again

* remove notion of target_arch since we're using the right node version with arch set correctly

* more comprehensive checks to ensure the arch is correct

* simplify building the binary, do not accept arch as options

* build the binary and test it on this branch

* remove arch, ensure that process.env.Platform is set to x86

* do build the binary unless this is a forked PR

* attempt to verify that this is a 32bit or 64bit windows binary

* remove unused dep

* consolidate commands

* don't install packages in windows - just build the binary

- this avoids needing to reinstall all node_modules and build-js twice

* build the binary on more branches

* cd up appveyor

* ugh

* right logic for whether or not this is a forked PR

* remove unused deps

* fix undefined var

* platformArch

* set in options

* turns out we do have to npm install before building the binary

* options.platformArch

* comment out appveyor build 32bit/64bit verification temporarily


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-04-08 11:48:14 -04:00
Brian Mann
a998b98058 Fix typescript binary building (#3858)
* enable esModuleInterop and fix typescript errors

* set typescript as root dep, use bin-up for tsc

* fix network package deps, add typescript build process

* add packages/server build process for typescript

* fix launcher exports

* formatting

* build the binary in this branch

* server: import in a stubbable way

* launcher: import stuff so it can be stubbed

* network: make stuff stubbable

* clean up imports

* network: let evil dns override dns.lookup


Co-authored-by: Zach Bloomquist <github@chary.us>
2019-04-01 20:08:19 -04:00
Zach Bloomquist
5a0d8b5cfe Allow passing a list of space-separated specs to --spec (#3375)
* cli: add otherSpecs for varargs [wip]

* scripts: pass command-line args through to debugged command

* cli: parse space-delimited specs

* cli: undo unneeded

* cli: cleaned up parseVariableOpts, added warning

* cli: cleanup

* cli: add tests

* cli: glorious whitespace

* cli: a more robust test

* cli: better snapshot

* server: strip single-quotes around --spec arg

#2298
2019-03-15 00:42:46 -04:00
renovate[bot]
40de6c55c7 chore(deps): update dependency nodemon to version 1.18.10 🌟 (#3408)
* chore(deps): update nodemon to 1.18.10 🌟

* remove nodemon - this is no longer used

* update test for including devdeps to reference another dev dep that we use


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-02-14 14:27:11 +06:30
Gleb Bahmutov
a81f38aa5a Build and sign Mac app on CircleCI (#3107)
* try codesign on mac circle

* run mac code sign setup as sudo

* check env variables

* pass org context to command

* update shell command

* hmm does shell need to login

* add FASTLANE_LANE

* fix log messages in build

* DEBUG code sign

* try importing profile first

* use sign shell script inline

* exit if importing profile fails

* unlock keychain

* try creating custom keychain and using it

* more unlocking

* try using -T

* append new keychain to the list

* try mac executor 10.1.0

* skip node version check

* set keychain name to use for signing

* remove passing name of the keychain

* more comments

* use env variables directly to code sign on mac

* use electron-builder to sign mac app

* try disabling publishing by electron-builder

* try testing Mac binary against kitchensink

* wait on the right job

* run on mac-sign-2 branch

* remove buildkite pipeline

* remove old commands

* darwin platform

* workflows via templates

* inherit stdio when calling codesign

* build binary for this branch

* actually build an app, dah

* add note about code sign in PR

* remove FASTLANE env variable

* enable linux builds and remove current branch
2019-01-09 22:52:23 -05:00
Gleb Bahmutov
b5b41febf1 Build osx on circle 2958 (#2978)
* use arch when caching dependencies on Circle

* add mac job

* hmm, mac name

* executor name

* use circle v2.1

* circle 2.1 cannot have job names start with a digit

* hmm, separate mac workflow

* shared build job via executor

* allow Node version mismatch on CircleCI Mac build

* correct workflow names per os

* do not check TERM on darwin platform

* move terminal check into a node script

* lint on both mac and linux

* pass linter

* enable full linux workflow

* try building on mac

* use xcode with Node 8.x

* try mac 9.1.0

* xcode 9.0.1

* run prebuild serially

* add node sass rebuild to desktop gui

* build on mac platform

* print identity on mac

* disable Mac workflow for now
2018-12-21 16:43:47 -05:00
Gleb Bahmutov
6cdaa5b4ef No dev deps in windows binary 2896 (#2904)
* build: print prod and dev dependencies in packages/server

* use npm v6 on Windows

* use only=production npm install flag

* use latest version of Node on AppVeyor

* add env with NODE_ENV=production

* pretty ms for npm install

* fix retry

* remove devDependencies from each file

* test binary build logic on Circle

* do not even run unit tests on circle

* form package json path

* cannot mapSeries twice

* pass package folder name

* fixed missing json to save

* uncomment circle tests

* update some comments, remove branches
2018-12-17 00:10:54 -05:00
Brian Mann
9edc8b921c don't ask to commit package.json version 2018-11-14 20:01:32 -05:00
Brian Mann
2333d04a54 secure cookie error crash (#2685)
- fixes #1264 
- fixes #1321 
- fixes #1799  
- fixes #2689
- fixes #2688
- fixes #2687 	
- fixes #2686
2018-11-01 12:34:37 -04:00
Chris Breiding
2a8478fc36 add dependency check pre-condition to all packages (#2580) 2018-10-15 16:42:32 -04:00
Brian Mann
d6046ba20b use cypress parallelism, enable konfig process.env overrides, (#2328)
fixes #2325
2018-08-13 07:22:12 -04:00
Brian Mann
18485538fd math derp, increase size again 2018-08-06 08:25:41 -04:00
Brian Mann
ff87a47b2e increase zip sizes 2018-08-06 08:03:44 -04:00
Amir Rustamzadeh
f313dd0b84 iterate through specs in parallel (#2154)
- fixes: #2153
- fixes: #1566
- fixes: #1690
- fixes: #2275
- fixes: #2276
2018-08-06 07:24:19 -04:00
Brian Mann
eda664891a increase allowed zip size... again
@Bkucera probably want to look at this again
2018-06-18 03:16:27 -04:00
Brian Mann
fc1cf4a144 fix failing build script 2018-06-18 02:56:44 -04:00
Brian Mann
b7756cff3f bump max size for windows zip 2018-05-29 08:22:40 -04:00
Brian Mann
64f2b15824 bump max size of zip 2018-05-29 08:22:40 -04:00
Brian Mann
a4dcac6c5d update schemas and runs fixture, @jennifer-shehane can you update the desktop gui views? thx (#1776)
* update schemas and runs fixture, @jennifer-shehane can you update the desktop gui views? thx

* update runs list view to match updated api schemas

* fix humanTime refactor
2018-05-25 13:09:26 -04:00
Brian Mann
1d0b35bd47 Cli env var changes (#1734)
* wip [skip ci] update

* wip [skip ci] update test

* [skip ci] fix env var

* bump sinon, create helper utility to always throw when a stub is called without being given stubbed behavior

* update failing specs

* fix some error messages

* update snapshot

* warning -> note, add snapshot tests

* change snapshot os.release, test env vars
2018-05-19 15:37:52 -04:00
Jennifer Shehane
8ec87e9cdb Issue 1601 - Update runs tab to match new api schemas (#1604)
* added 'object-schema' project, began updating fixture to match schema

* Update run display to match new api schemas

- add timer display component
- add some util functions
- update tests to actual test the run data
- capital cased some messaging in the runs

* desktop-gui: use json-schemas for testing

* remove only

* testing: copy integration artifacts on circle, close #1616

* rename api_schemas -> api_schemas_spec

* update more headings/buttons to have capital case text

- update some tests to be less brittle when text is changed.

* set timezone NYC
2018-04-23 16:26:40 -04:00
Gleb Bahmutov
586d677b3d ci: use Node 8.2.1 to build binary on Windows CI #1390 (#1391)
* ci: use Node 8.2.1 to build binary on Windows CI #1390

* use Node 8.2.1 on Mac buildkite

* add comment

* source bashrc

* print home folder

* do not source bashrc

* install nvm using curl

* back to nvm using bash_profile

* hmm, maybe it is using different shell

* hmm, login into bash

* remove nvm commands

* chore: add script to check Node version against .node-version
2018-02-28 15:37:43 -05:00
Brian Mann
b48d29c07e electron: upgrade to 1.8.2, node 8.2.1, chromium 59 (#1275)
* electron: upgrade to 1.8.2, node 8.2.1, chromium 59

* server: update snapshots for node

* server: try to debug timeouts for mochawesome

* bump zunder

- node-sass 3.13.1 does not work with Node 8, since we’re upgrading the
project to node 8.2.1, we needed node-sass 4.5.3+. This node-sass dep
was coming from gulp-sass dep in zunder which has since been updated

* server: figured out that fixture scaffolding can cause timeouts

* bump zunder - get fix so that asserts are not prefixed with /

* server: use our own heroku example app

* use cypress/browsers:chrome64 docker image on Circle with Node 8

* update root folder name

* add hash to root cache

* disable permissions test, because cannot run as root

* server: only disable test in CI

* test new binary against other projects

* all: rename cypress-monorepo -> cypress

* scripts: use latest docker container

* server: don't skip as this messes up hooks which cause failures downstream

* driver: bump timeout for zonejs

* server: make tests pass for node 8.2.1 and 8.4.0
2018-02-10 22:08:56 -05:00