Skip to content

Commit

Permalink
merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jan 22, 2020
2 parents 105b13c + 9ac5fe3 commit bcc48f2
Show file tree
Hide file tree
Showing 206 changed files with 16,041 additions and 12,083 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
],
"extends": [
"plugin:@cypress/dev/general"
]
],
"rules": {
"prefer-spread": "off"
}
}
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<!-- Is this a question? Don't open an issue. Ask in our chat https://on.cypress.io/chat -->
<!-- Is this a question? Questions WILL BE CLOSED. Ask in our chat https://on.cypress.io/chat -->

### Current behavior:

<!-- images, stack traces, etc -->
<!-- A description including screenshots, stack traces, DEBUG logs, etc -->

### Desired behavior:

<!-- A clear concise description of what you want to happen -->
<!-- A clear description of what you want to happen -->

### Steps to reproduce: (app code and test code)
### Test code to reproduce

<!-- Issues without reproducible steps WILL BE CLOSED -->
<!-- If we cannot fully run the tests as provided the issue WILL BE CLOSED -->
<!-- Issues without a reproducible example WILL BE CLOSED -->

<!-- You can fork https://github.com/cypress-io/cypress-test-tiny repo, set up a failing test, then tell us the repo/branch to try. -->
<!-- You can fork https://github.com/cypress-io/cypress-test-tiny repo, set up a failing test, then link to your fork -->

### Versions

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.0.0
12.8.1
19 changes: 15 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ For some issues, there are places you can check for more information. This may h

### Fill out our Issue Template

When opening an issue, there is a provided [issue template](./ISSUE_TEMPLATE.md). Fill out the information according to the template. This is information needed for Cypress to continue forward with your problem. Any issues that do not follow the issue template will be closed.
When opening an issue, there is a provided [issue template](./.github/ISSUE_TEMPLATE.md). Fill out the information according to the template. This is information needed for Cypress to continue forward with your problem. Any issues that do not follow the issue template will be closed.

### Describe Problems

Expand Down Expand Up @@ -148,9 +148,9 @@ If an issue already exists you should:

### Does the issue provide all the information from our issue template?

When opening an issue, there is a provided [issue template](./ISSUE_TEMPLATE.md). If the opened issue does not provide enough information asked from the issue template you should:
When opening an issue, there is a provided [issue template](./.github/ISSUE_TEMPLATE.md). If the opened issue does not provide enough information asked from the issue template you should:

- Explain that we require new issues follow our provided [issue template](./ISSUE_TEMPLATE.md) and that issues that are opened without this information are automatically closed per our [contributing guidelines](#fill-out-our-issue-template).
- Explain that we require new issues follow our provided [issue template](./.github/ISSUE_TEMPLATE.md) and that issues that are opened without this information are automatically closed per our [contributing guidelines](#fill-out-our-issue-template).
- Close the issue.

### Are they running the current version of Cypress?
Expand Down Expand Up @@ -268,6 +268,17 @@ You must have [`node`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com

### Getting Started

> **⚠ Running on Windows?**
>
> Many of the NPM scripts used during development use commands designed for a Linux-like shell.If you are running a Windows operating system, you may encounter many commands that are not working. To fix this behavior, you have to set a Linux-like shell as the default `npm` script shell. If you have Git for Windows installed, you can set Git Bash as the default script shell by using the following command:
> ```bash
> npm config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"
> ```
> Git Bash may be installed in `Program Files`, if so, use the following command:
>```bash
>npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
>```
**Install all dependencies:**

```bash
Expand Down Expand Up @@ -464,7 +475,7 @@ The repository is setup with two main (protected) branches.

### Pull Requests

- When opening a PR for a specific issue already open, please name the branch you are working on using the convention `issue-[issue number]`. For example, if your PR fixes Issue #803, name your branch `issue-803`. If the PR is a larger issue, you can add more context like `issue-803-new-scrollable-area` If there is not an associated open issue, **create an issue using our [Issue Template](./ISSUE_TEMPLATE.md)**.
- When opening a PR for a specific issue already open, please name the branch you are working on using the convention `issue-[issue number]`. For example, if your PR fixes Issue #803, name your branch `issue-803`. If the PR is a larger issue, you can add more context like `issue-803-new-scrollable-area` If there is not an associated open issue, **create an issue using our [Issue Template](./.github/ISSUE_TEMPLATE.md)**.
- PR's can be opened before all the work is finished. In fact we encourage this! Please write `[WIP]` in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the `[WIP]` is removed.
- Fill out the [Pull Request Tempalte](./PULL_REQUEST_TEMPLATE.md) completely within the body of the PR. If you feel some areas are not relevant add `N/A` as opposed to deleteing those sections. PR's will not be reviewed if this template is not filled in.
- Please check the "Allow edits from maintainers" checkbox when submitting your PR. This will make it easier for the maintainers to make minor adjustments, to help with tests or any other changes we may need.
Expand Down
33 changes: 21 additions & 12 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ Once the `develop` branch for all test projects are reliably passing with the ne

### Steps to Publish a New Version

0. Make sure that if there is a new [`cypress-example-kitchensink`][https://github.com/cypress-io/cypress-example-kitchensink/releases] version, the corresponding dependency in [`packages/example`](./packages/example) has been updated to that new version.
In the following instructions, "X.Y.Z" is used to denote the version of Cypress being published.

0. Make sure that if there is a new [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink/releases) version, the corresponding dependency in [`packages/example`](./packages/example) has been updated to that new version.
1. Make sure that you have the correct environment variables set up before proceeding.
- You'll need Cypress AWS access keys in `aws_credentials_json`, which looks like this:
```text
Expand All @@ -123,38 +125,45 @@ Once the `develop` branch for all test projects are reliably passing with the ne
```
3. Publish the new NPM package under the `dev` tag. The unique link to the package file `cypress.tgz` is the one already tested above. You can publish to the NPM registry straight from the URL:
```shell
npm publish https://cdn.../npm/3.4.0/<long sha>/cypress.tgz --tag dev
npm publish https://cdn.../npm/X.Y.Z/<long sha>/cypress.tgz --tag dev
```
4. Double-check that the new version has been published under the `dev` tag using `npm info cypress` or [available-versions](https://github.com/bahmutov/available-versions):
4. Double-check that the new version has been published under the `dev` tag using `npm info cypress` or [available-versions](https://github.com/bahmutov/available-versions). Example output:
```shell
dist-tags:
dev: 3.4.0 latest: 3.3.2
```
5. Test `cypress@3.4.0` again to make sure everything is working. You can trigger test projects from the command line (if you have the appropriate permissions)
5. Test `cypress@X.Y.Z` again to make sure everything is working. You can trigger test projects from the command line (if you have the appropriate permissions)
```
node scripts/test-other-projects.js --npm cypress@3.4.0 --binary 3.4.0
node scripts/test-other-projects.js --npm cypress@X.Y.Z --binary X.Y.Z
```
6. Test the new version of Cypress against the Cypress dashboard repo.
7. Update and publish the changelog and any release-specific documentation changes in [cypress-documentation](https://github.com/cypress-io/cypress-documentation).
8. Make the new NPM version the "latest" version by updating the dist-tag `latest` to point to the new version:
```shell
npm dist-tag add cypress@3.4.0
npm dist-tag add cypress@X.Y.Z
```
9. Run `binary-release` to update the download the server's manifest, set the next CI version, and create an empty version commit:
```shell
npm run binary-release -- --version 3.4.0 --commit`
npm run binary-release -- --version X.Y.Z --commit
```
10. If needed, push out any updated changes to the links manifest to [`on.cypress.io`](https://github.com/cypress-io/cypress-services/tree/develop/packages/on).
11. If needed, deploy the updated [`cypress-example-kitchensink`][cypress-example-kitchensink] to `example.cypress.io` by following [these instructions under "Deployment"](./packages/example/README.md).
12. Update the releases in [ZenHub](https://app.zenhub.com/workspaces/test-runner-5c3ea3baeb1e75374f7b0708/reports/release):
- Close the current release in ZenHub.
- Create a new patch release (and a new minor release, if this is a minor release) in ZenHub, and schedule them both to be completed 2 weeks from the current date.
13. Bump `version` in [`package.json`](package.json) and commit it to `develop` using a commit message like `release 3.4.0 [skip ci]`
14. Tag this commit with `v3.4.0` and push that tag up.
- Move all issues that are still open from the current release to the appropriate future release.
13. Bump `version` in [`package.json`](package.json) and commit it to `develop` using a commit message like `release X.Y.Z [skip ci]`
14. Tag this commit with `vX.Y.Z` and push that tag up.
15. Merge `develop` into `master` and push that branch up.
16. Using [cypress-io/release-automations][release-automations]:
- Publish GitHub release to [cypress-io/cypress/releases](https://github.com/cypress-io/cypress/releases) using package `set-releases` (see its README for details).
- Add a comment to each GH issue that has been resolved with the new published version using package `issues-in-release` (see its README for details)
16. Inside of [cypress-io/release-automations][release-automations]:
- Publish GitHub release to [cypress-io/cypress/releases](https://github.com/cypress-io/cypress/releases) using package `set-releases`:
```shell
cd set-releases && npm run release-log -- --version X.Y.Z
```
- Add a comment to each GH issue that has been resolved with the new published version using package `issues-in-release`:
```shell
cd issues-in-release && npm run do:comment -- --version X.Y.Z
```
17. Publish a new docker image in [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images) under `included` for the new cypress version.
18. Decide on the next version that we will work on. For example, if we have just released `3.7.0` we probably will work on `3.7.1` next. Set it on [CI machines](#set-next-version-on-cis).
19. Try updating as many example projects to the new version. You probably want to update by using Renovate dependency issue like [`cypress-example-todomvc` "Update Dependencies (Renovate Bot)](https://github.com/cypress-io/cypress-example-todomvc/issues/99). Try updating at least the following projects:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ branches:
# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "12.0.0"
nodejs_version: "12.8.1"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down
50 changes: 33 additions & 17 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
version: 2.1

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
# so just add your branch to the list here to build and test on Mac
macBuildFilters: &macBuildFilters
filters:
branches:
only:
- develop

defaults: &defaults
parallelism: 1
working_directory: ~/cypress
Expand All @@ -19,11 +28,12 @@ defaults: &defaults
COLUMNS: 100
LINES: 24


executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node12.0.0-chrome73
- image: cypress/browsers:node12.8.1-chrome78-ff70
environment:
PLATFORM: linux

Expand Down Expand Up @@ -960,54 +970,71 @@ linux-workflow: &linux-workflow
requires:
- build
- server-performance-tests:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-1:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-2:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-3:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-4:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-5:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-6:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-7:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-chrome-8:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-1:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-2:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-3:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-4:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-5:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-6:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-7:
context: test-runner:performance-tracking
requires:
- build
- server-e2e-tests-electron-8:
context: test-runner:performance-tracking
requires:
- build
- driver-integration-tests-chrome:
Expand Down Expand Up @@ -1059,6 +1086,7 @@ linux-workflow: &linux-workflow
requires:
- build-npm-package
- build-binary:
context: test-runner:performance-tracking
requires:
- build
- upload-binary:
Expand Down Expand Up @@ -1120,20 +1148,14 @@ mac-workflow: &mac-workflow
- build:
name: Mac build
executor: mac
filters:
branches:
only:
- develop
<<: *macBuildFilters

- lint:
name: Mac lint
executor: mac
<<: *macBuildFilters
requires:
- Mac build
filters:
branches:
only:
- develop

# maybe run unit tests?

Expand Down Expand Up @@ -1162,10 +1184,7 @@ mac-workflow: &mac-workflow
name: Mac binary
context: org-global
executor: mac
filters:
branches:
only:
- develop
<<: *macBuildFilters
requires:
- Mac build

Expand All @@ -1183,10 +1202,7 @@ mac-workflow: &mac-workflow
- test-kitchensink:
name: Test Mac Kitchensink
executor: mac
filters:
branches:
only:
- develop
<<: *macBuildFilters
requires:
- Mac build

Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ See `scripts/build.js`. Note that the built npm package will include [NPM_README

## Testing

## Automated
### Automated

You can run unit tests with:

Expand Down
3 changes: 2 additions & 1 deletion cli/__snapshots__/cli_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ exports['shows help for run --foo 1'] = `
-e, --env <env> sets environment variables. separate multiple values with a comma. overrides any value in cypress.json or cypress.env.json
--group <name> a named group for recorded runs in the Cypress Dashboard
-k, --key <record-key> your secret Record Key. you can omit this if you set a CYPRESS_RECORD_KEY environment variable.
--headed displays the Electron browser instead of running headlessly
--headed displays the browser instead of running headlessly (defaults to true for Chrome-family browsers)
--headless hide the browser instead of running headed (defaults to true for Electron)
--no-exit keep the browser open after tests finish
--parallel enables concurrent runs and automatic load balancing of specs across multiple machines or processes
-p, --port <port> runs Cypress on a specific port. overrides any value in cypress.json.
Expand Down
1 change: 1 addition & 0 deletions cli/__snapshots__/errors_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports['errors individual has the following errors 1'] = [
"childProcessKilled",
"failedDownload",
"failedUnzip",
"incompatibleHeadlessFlags",
"invalidCacheDirectory",
"invalidCypressEnv",
"invalidSmokeTestDisplayError",
Expand Down
10 changes: 7 additions & 3 deletions cli/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const _ = require('lodash')
const commander = require('commander')
const { stripIndent } = require('common-tags')
const logSymbols = require('log-symbols')
const debug = require('debug')('cypress:cli')
const debug = require('debug')('cypress:cli:cli')
const util = require('./util')
const logger = require('./logger')
const errors = require('./errors')
Expand Down Expand Up @@ -82,6 +82,8 @@ const parseVariableOpts = (fnArgs, args) => {
})
}

debug('variable-length opts parsed %o', { args, opts })

return util.parseOpts(opts)
}

Expand All @@ -101,7 +103,8 @@ const descriptions = {
forceInstall: 'force install the Cypress binary',
global: 'force Cypress into global mode as if its globally installed',
group: 'a named group for recorded runs in the Cypress Dashboard',
headed: 'displays the Electron browser instead of running headlessly',
headed: 'displays the browser instead of running headlessly (defaults to true for Chrome-family browsers)',
headless: 'hide the browser instead of running headed (defaults to true for Electron)',
key: 'your secret Record Key. you can omit this if you set a CYPRESS_RECORD_KEY environment variable.',
parallel: 'enables concurrent runs and automatic load balancing of specs across multiple machines or processes',
port: 'runs Cypress on a specific port. overrides any value in cypress.json.',
Expand Down Expand Up @@ -204,6 +207,7 @@ module.exports = {
.option('--group <name>', text('group'))
.option('-k, --key <record-key>', text('key'))
.option('--headed', text('headed'))
.option('--headless', text('headless'))
.option('--no-exit', text('exit'))
.option('--parallel', text('parallel'))
.option('-p, --port <port>', text('port'))
Expand All @@ -215,7 +219,7 @@ module.exports = {
.option('-t, --tag <tag>', text('tag'))
.option('--dev', text('dev'), coerceFalse)
.action((...fnArgs) => {
debug('running Cypress')
debug('running Cypress with args %o', fnArgs)
require('./exec/run')
.start(parseVariableOpts(fnArgs, args))
.then(util.exit)
Expand Down
Loading

0 comments on commit bcc48f2

Please sign in to comment.