* adjust eslint config

* run prettier

* limit cypress run

* add all cypress files
This commit is contained in:
Konstantin Vyatkin 2019-10-31 08:11:46 -04:00 committed by Josh Johnson
parent 034191c78a
commit 5051bf1b10
4 changed files with 21 additions and 8 deletions

View file

@ -69,8 +69,11 @@
}
},
{
"files": ["cypress/**/*.spec.js"],
"files": ["cypress/**"],
"plugins": ["cypress"],
"rules": {
"no-unused-vars": "warn"
},
"env": {
"cypress/globals": true
}

View file

@ -1,6 +1,16 @@
name: Cypress
on: [pull_request]
on:
pull_request:
paths:
- 'src/**'
- 'package-lock.json'
- '.browserslistrc'
- '.babelrc'
- 'webpack.config.*'
- 'public/test/**'
- 'cypress/**'
- '.github/workflows/cypress.yml'
jobs:
test-e2e:
@ -20,13 +30,13 @@ jobs:
env:
HUSKY_SKIP_INSTALL: true
- name: run Cypress
run: npx run-p --race start cypress:run
- name: run Cypress CI
run: npx run-p --race start cypress:ci
env:
CI: true
TERM: xterm-256color
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
DEBUG: commit-info,cypress:server:record
# https://docs.cypress.io/guides/guides/continuous-integration.html#Environment-variables
COMMIT_INFO_BRANCH: ${{ github.head_ref }}
COMMIT_INFO_AUTHOR: ${{ github.event.sender.login }}
COMMIT_INFO_SHA: ${{ github.event.after }}
NODE_ENV: production # prevent watching

View file

@ -14,4 +14,4 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
};

View file

@ -14,7 +14,7 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')