mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 08:52:19 +02:00
Fix lint (#723)
* adjust eslint config * run prettier * limit cypress run * add all cypress files
This commit is contained in:
parent
034191c78a
commit
5051bf1b10
|
@ -69,8 +69,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["cypress/**/*.spec.js"],
|
"files": ["cypress/**"],
|
||||||
"plugins": ["cypress"],
|
"plugins": ["cypress"],
|
||||||
|
"rules": {
|
||||||
|
"no-unused-vars": "warn"
|
||||||
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"cypress/globals": true
|
"cypress/globals": true
|
||||||
}
|
}
|
||||||
|
|
20
.github/workflows/cypress.yml
vendored
20
.github/workflows/cypress.yml
vendored
|
@ -1,6 +1,16 @@
|
||||||
name: Cypress
|
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:
|
jobs:
|
||||||
test-e2e:
|
test-e2e:
|
||||||
|
@ -20,13 +30,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
HUSKY_SKIP_INSTALL: true
|
HUSKY_SKIP_INSTALL: true
|
||||||
|
|
||||||
- name: run Cypress
|
- name: run Cypress CI
|
||||||
run: npx run-p --race start cypress:run
|
run: npx run-p --race start cypress:ci
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
TERM: xterm-256color
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
DEBUG: commit-info,cypress:server:record
|
DEBUG: commit-info,cypress:server:record
|
||||||
# https://docs.cypress.io/guides/guides/continuous-integration.html#Environment-variables
|
# https://docs.cypress.io/guides/guides/continuous-integration.html#Environment-variables
|
||||||
COMMIT_INFO_BRANCH: ${{ github.head_ref }}
|
COMMIT_INFO_BRANCH: ${{ github.head_ref }}
|
||||||
COMMIT_INFO_AUTHOR: ${{ github.event.sender.login }}
|
NODE_ENV: production # prevent watching
|
||||||
COMMIT_INFO_SHA: ${{ github.event.after }}
|
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
module.exports = (on, config) => {
|
module.exports = (on, config) => {
|
||||||
// `on` is used to hook into various events Cypress emits
|
// `on` is used to hook into various events Cypress emits
|
||||||
// `config` is the resolved Cypress config
|
// `config` is the resolved Cypress config
|
||||||
}
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
// Import commands.js using ES2015 syntax:
|
||||||
import './commands'
|
import './commands';
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
// Alternatively you can use CommonJS syntax:
|
||||||
// require('./commands')
|
// require('./commands')
|
||||||
|
|
Loading…
Reference in a new issue