Commit Graph

206 Commits

Author SHA1 Message Date
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
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
Jennifer Shehane 49554ebcce fix indentation in circle.yml 2019-04-23 12:06:53 +06:30
Jennifer Shehane daf8a38283 remove DEBUG logs from circleci output 2019-04-23 11:40:08 +06:30
Brian Mann 35f49c40ed add more debug logs 2019-04-18 06:29:54 -04:00
Brian Mann 526ff493c9 add debug logs 2019-04-18 01:51:31 -04:00
Gleb Bahmutov da17a7ca09 remove extra build branches 2019-04-09 12:08:10 -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 https://github.com/cypress-io/cypress-test-node-versions/commit/61c24b20006e1de91a8cff77de726d485191bb0d

<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 3ec7ccee28 debug perf tests, write har results to circle artifacts (#3869)
* debug perf tests, write har results to circle artifacts

* increase timeout

* sanitize the har filename

* move the catch block below the then - so it's not run twice. only catch ECONNREFUSED

- fix merge conflicts
2019-04-03 00:07:33 -04:00
Brian Mann 6022cb5a6e bump the node_modules cache for driver + server 2019-04-02 19:01:24 -04:00
Brian Mann a3f66998d8 install from cypress.tgz 2019-04-02 17:43:24 -04:00
Brian Mann 01667ec1dc run the reporter cypress integration tests in circle 2019-04-02 14:51:32 -04:00
Brian Mann 527eda21bb cache packages/network node_modules 2019-04-02 14:43:30 -04:00
Brian Mann c830ce7317 bump cli + server npm modules version in circle 2019-04-02 14:43:30 -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 c1a345dce2 Improved proxy support (#3531)
* https-proxy: unused file

* server: wrap all https requests that use a proxy

* server: use request lib in ensureUrl if proxy is in use. this makes runs tab work behind a proxy

* electron: pass --proxy-server to app itself, so the embedded github login page works

* cli: first attempt at env vars from windows registry

* cli: api cleanup

* cli: lint

* cli: fix crash on no proxy, add tests

* add desktop-gui watch to terminals.json

* cli: pass along --proxy-source

* electron: pass --proxy-bypass-list too

* server: whitelist proxy* args

* cli: better wording

* desktop-gui: display proxy settings

* extension: force proxy [wip]

* extension: finally, i am victorious over coffeescript

* extension: add -loopback to bypasslist

* extension: revert changes

Revert "extension: force proxy [wip]"

This reverts commit 3ab6ba42a763f25ee65f12eb8b79eb597efc9b11.

* desktop-gui: skip proxysettings if there aren't any

* https-proxy, server: proxy directConnections using https-proxy-agent

* https-agent: pool httpsAgents

* https-proxy: work when they're not on a proxy

* https-proxy: ci - use agent 1.0

* https-proxy: tests

* desktop-gui: hide proxy settings when not using proxy

* https-proxy: pass req through to https-proxy-agent callback

* cli: use get-windows-proxy

* desktop-gui: always show proxy settings

* server: use get-windows-proxy

* electron, server: supply electron proxy config when window launched

* server: fix

* https-proxy: cleanup

* server: clean up ensureUrl

* https-proxy: cleanup

* cli: fix

* cli: fix destructuring

* server: enable ForeverAgent to pool HTTPS/HTTP connections

#3192

* server: updating snapshot

* https-proxy: don't crash, do error if proxy unreachable

* https-proxy:

* get-windows-proxy@1.0.0

* https-proxy: use proxy-from-env to decide on a proxy for a url

* server: fallback to HTTP_PROXY globally if HTTPS_PROXY not set

* server: proxy args test

* cli: add proxy tests

* cli: add test that loadSystemProxySettings is called during download

* cli, server: account for the fact that CI has some proxy vars set

* https-proxy: ""

* cli, https-proxy, server: ""

* desktop-gui: update settings gui

* desktop-gui: cypress tests for proxy settings

* server: strict undefined check

* cli, server: move get-windows-proxy to scope, optionalDeps

* server, cli: use new and improved get-windows-proxy

* cli, server: 1.5.0

* server: re-check for proxy since cli may have failed to load the lib

* server, cli: 1.5.1

* server: NO_PROXY=localhost by default, clean up

* https-proxy: disable Nagle's on proxy sockets

\#3192

* https-proxy: use setNoDelay on upstream, cache https agent

* https-proxy: test basic auth

* https-proxy: add todo: remove this

* server: add custom HTTP(s) Agent implementation w keepalive, tunneling

* server: typescript for agent

* add ts to zunder

* server: more ts

* ts: add missing Agent type declaration

* server: create CombinedAgent

* server: use agent in more places

* ts: more declarations

* server: make script work even if debug port not supplied

* server: begin some testing

* server, ts: agent, tests

* server: test

* server: agent works with websockets now

* server: update snapshot

* server: work out some more bugs with websockets

* server: more websockets

* server: add net_profiler

* https-proxy: fix dangling socket on direct connection

* server: fix potential 'headers have already been sent'

* https-proxy: nab another dangler

* server: update test to expect agent

* https-proxy: fix failing test

* desktop-gui: change on-link

* server: add tests for empty response case

* server: tests

* server: send keep-alive with requests

* server: make net profiler hook on socket.connect

* server: only hook profiler once

* server: update tests, add keep-alive test

* server: only regen headers if needed

* server: move http_overrides into CombinedAgent, make it proxy-proof

for #112

* server: update snapshot

* server: undo

* server: avoid circular dependency

* https-proxy, server: use our Agent instead of https-proxy-agent

* server: add dependency back

* cli: actually use proxy for download

* server, launcher, ts: typescript

* Revert "server, launcher, ts: typescript"

This reverts commit d3f8b8bbb6.

* Revert "Revert "server, launcher, ts: typescript""

This reverts commit 818dfdfd00.

* ts, server: respond to PR

* server, ts: types

* ts: really fix types

* https-proxy, server: export CA from https-proxy

* agent, server, https-proxy: move agent to own package

* agent => networking, move connect into networking

* fix tests

* fix test

* networking: respond to PR changes, add more unit tests

* rename ctx

* networking, ts: add more tests

* server: add ensureUrl tests

* https-proxy: remove https-proxy-agent

* server: use CombinedAgent for API

* server: updates

* add proxy performance tests

* add perf tests to workflow

* circle

* run perf tests with --no-sandbox

* networking, ts: ch-ch-ch-ch-changes

* server, networking: pr changes

* run networking tests in circle

* server: fix performance test

* https-proxy: test that sockets are being closed

* https-proxy: write, not emit

* networking: fix test

* networking: bubble err in connect

* networking: style

* networking: clean p connect error handling

* networking => network

* server: make perf tests really work

* server: really report

* server: use args from browser

* server: use AI to determine max run time

* server: load electron only when needed


Co-authored-by: Brian Mann <brian@cypress.io>
2019-03-31 23:39:10 -04:00
Jennifer Shehane 0e3289debd check that item.first function exists before calling (#3084)
* check that item.first function exists before calling

- should help with support of jQuery legacy
- fix issue introduced by
https://github.com/cypress-io/cypress/pull/2870

* Add test for checking item existence before calling item.first

* remove jquery 2.2.4 from git...

* improve the detection of jquery instances

- this fixes improperly detecting when any instance has a jquery
property

* really go back down to 3 machines this time


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-03-15 06:33:51 -04:00
Brian Mann 602d7f49e1 bump back down to 4x parallelization 2019-03-15 03:35:12 -04:00
Brian Mann ef3df789e7 add two more machines in parallel for driver tests 2019-03-15 01:43:18 -04:00
Gleb Bahmutov 83d35d3725 remove stray circleci line, more CLI types comments 2019-03-05 13:09:50 -05:00
Gleb Bahmutov f81dc7a6b2 move 3rd party types to dev dependencies in CLI NPM package (#3425)
* wip: move lodash types to dev dependencies

* move blob-util types

* move types for minimatch

* do not lint types from minimatch

* move types sinon to dev dependencies

* move sinon-chai types to dev dependencies

* update tslint

* move types bluebird to dev dependencies

* move mocha types

* move jquery types to dev dependencies

* rename moment local wrapper

* move chai and chai-jquery

* refactor code for building CLI and dealing with folders

* linting

* include types subfolders

* replace types with relative paths

* transform sinon path to relative

* linting

* do not delete d.ts files

* linting

* chore: build npm package from this branch

* add minimatch relative reference

* work around minimatch

* set sinon to be relative load

* add readme to CLI

* linting readme
2019-03-05 12:49:42 -05:00
Gleb Bahmutov ecf98cfdec separate dtslint into its own CircleCI job (#3528)
* separate dtslint into its own CircleCI job

* fix indent
2019-02-28 09:07:44 -05:00
Chris Breiding f70306a63c try v8 for reporter and runner caches (#3600) 2019-02-26 18:06:39 -05:00
Chris Breiding 36fd7ca902 match the reporter cache key (#3598) 2019-02-26 14:52:18 -05:00
Chris Breiding 8ef421da15 increment reporter cache key (#3596) 2019-02-26 14:36:19 -05:00
Brian Mann 151ee40bec purge all the server deps cached in circle 2019-02-18 16:44:26 -05:00
Gleb Bahmutov 967f267cfc chore: run build-js in all packages with unit tests 2019-01-30 15:38:54 -05:00
Gleb Bahmutov 6dba9e3c67 Update stop only and catch em (#3150)
* chore: upgrade stop-only and catch them

* run stop-only first on precommit

* just warn on precommit .only

* testing

* testing done

* run stop-only on git prepush hook
2019-01-17 10:18:58 -05:00
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 71429e620e Fix TypeScript Omit definition (#3031)
* test built binary and NPM against kitchensink

* try building cypress/browsers:chrome67

* implement Omit using Exclude

* bump down to chrome64

* remove this branch from building binary
2019-01-02 15:09:18 -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
Brian Mann d0ff0d1547 bump cli cache dep versions in circle 2018-12-20 00:49:03 -05:00
Chris Breiding ed1467f248 Fix reporter Cypress tests and set up to run in CI (#2607)
Closes #2606
2018-10-15 10:59:14 -04:00
Brian Mann 9d581fdbf1 move env vars back to inline commands 2018-08-24 19:09:19 -04:00
Jennifer Shehane 6ec38dd901 removed keys from inline commands 2018-08-24 18:32:48 -04:00
Gleb Bahmutov 153dc1c521 switch to circle workspace for #2398 (#2399)
* switch to circle workspace for #2398

* test all jobs in this branch

* remove temp branch build
2018-08-24 15:03:59 -04:00
Brian Mann 5732dab23b add another e2e instance, move around some specs for balancing 2018-08-13 08:35:46 -04:00
Brian Mann 47c0d67813 rename to squeeze out a bit more balanced perf (2) 2018-08-13 08:03:26 -04:00
Brian Mann d6046ba20b use cypress parallelism, enable konfig process.env overrides, (#2328)
fixes #2325
2018-08-13 07:22:12 -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 f25ea5fea7 specify clearly the browser used for driver tests 2018-07-23 11:52:40 -04:00
Brian Mann 98fc4bc83c screenshot perf and high dpi res (#1864)
- fixes #1857 
- fixes #1863
2018-06-18 03:15:02 -04:00
Brian Mann d92d51a8eb rename videoRecording -> video (#1804) 2018-05-29 17:23:01 -04:00
Brian Mann f587f98d81 i guess stay at npm 5.3.0 2018-05-29 07:18:58 -04:00
Brian Mann 556d70d4b6 try npm@5.6.0 2018-05-29 07:13:26 -04:00
Brian Mann 73d3e8aa41 wat 2018-05-29 07:05:22 -04:00
Brian Mann 0ad51076cd install latest version of npm 2018-05-29 06:47:37 -04:00
Brian Mann fc423ca467 WIP creating a new banner + summary table for runs #1588 (#1722)
* WIP creating a new banner + summary table for runs [skip ci]

* WIP continuing to iterate on new run output, use tables for results [skip ci]

* log -> debug

* switch out 400 -> 412 status code on schema errors

* update humanTime to take short or long formats

* debug the starting argv

* create terminal-size wrapper to return terminal columns + rows

* created custom terminal tables for displaying new stdout results for running multiple specs

- made tables responsive when columns < 100

* add e2e tests around exiting with error when browser cannot be found or specs cannot be found

- instead of creating a run, immediately die without making any requests
- improve BROWSER_NOT_FOUND error message

* strip ansi color codes from terminal spec, use chalk instead of colors

* pass webUrl from recording runs to be able to display URL before tests run

* finished new stdout flow for running specs iteratively

* when webUrl is present, display the recorded run in the header + footer

- move from ‘white’ to ‘reset’
- tighten up intro table

* change results output from "Video Captured" to "Video" to pair with newest config option

* use runUrl, not webUrl, fix white space, ensure that e2e snapshots are accurately normalized

* use console.log, not console.error to capture stdout for dashboard

* e2e tests around logging warnings when cannot record video

* 0 seconds -> X seconds

* Tests Starting -> Run Starting, Tests Finished -> Results

* Started video recording -> hr line break

* All Done -> Run Finished

* evenly space stdout section headers

* add a new line when exiting early from bundle errors

* sanitize stdout better, replace duration seconds, etc

* update all the various e2e stdout snapshots

* ensure that COLUMNS env is set to 100 for snapshots to pass

* better logging for env var

* env -> stdout

* store as string

* remove columns

* echo columns

* add columns back in

* comment out

* set terminal columns

* cleanup circle.yml [skip ci]

* normalize more result properties for browser, os, cypress

* set columns for server tests

* enforce no colors and correct columns + rows for e2e tests, fix cloning env vars

* update e2e tests for newest stdout

* set env vars for columns + lines for e2e tests, remove stty

* fix snapshots when duration is X second, X seconds, or XX seconds

* use process.env.COLUMNS not process.stdout

* ugh

* stringify

* log crap out

* quotes oh my

* fix failing e2e snapshot tests

* fix failing e2e tests

* fix failing integration tests

* fixes failing unit tests
2018-05-21 18:37:35 -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