Browse Source
use node:latest-browsers images (#2966)
* use node:latest-browsers images
* fix no-extraneous-dependencies error
pull/2973/head
陈帅
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
9 additions and
25 deletions
-
.circleci/config.yml
-
.eslintignore
-
.eslintrc.js
-
Dockerfile
-
package.json
-
tests/fix_puppeteer.sh
-
tests/run-tests.js
|
|
@ -9,10 +9,9 @@ jobs: |
|
|
- run: npm run build |
|
|
- run: npm run build |
|
|
test: |
|
|
test: |
|
|
docker: |
|
|
docker: |
|
|
- image: circleci/node:latest |
|
|
- image: circleci/node:latest-browsers |
|
|
steps: |
|
|
steps: |
|
|
- checkout |
|
|
- checkout |
|
|
- run: sh ./tests/fix_puppeteer.sh |
|
|
|
|
|
- run: npm install |
|
|
- run: npm install |
|
|
- run: |
|
|
- run: |
|
|
command : npm run test:all |
|
|
command : npm run test:all |
|
|
|
|
|
@ -1,3 +1 @@ |
|
|
/functions/mock |
|
|
/functions/mock/** |
|
|
/tests/* |
|
|
|
|
|
./* |
|
|
|
|
|
@ -22,7 +22,10 @@ module.exports = { |
|
|
'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }], |
|
|
'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }], |
|
|
'import/no-extraneous-dependencies': [ |
|
|
'import/no-extraneous-dependencies': [ |
|
|
2, |
|
|
2, |
|
|
{ optionalDependencies: true, devDependencies: false }, |
|
|
{ |
|
|
|
|
|
optionalDependencies: true, |
|
|
|
|
|
devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'], |
|
|
|
|
|
}, |
|
|
], |
|
|
], |
|
|
'jsx-a11y/no-noninteractive-element-interactions': 0, |
|
|
'jsx-a11y/no-noninteractive-element-interactions': 0, |
|
|
'jsx-a11y/click-events-have-key-events': 0, |
|
|
'jsx-a11y/click-events-have-key-events': 0, |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
FROM circleci/node:latest |
|
|
FROM circleci/node:latest-browsers |
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app/ |
|
|
WORKDIR /usr/src/app/ |
|
|
USER root |
|
|
USER root |
|
|
@ -7,13 +7,6 @@ RUN yarn |
|
|
|
|
|
|
|
|
COPY ./ ./ |
|
|
COPY ./ ./ |
|
|
|
|
|
|
|
|
RUN apt-get update |
|
|
|
|
|
RUN apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ |
|
|
|
|
|
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ |
|
|
|
|
|
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ |
|
|
|
|
|
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ |
|
|
|
|
|
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget |
|
|
|
|
|
|
|
|
|
|
|
RUN npm run test:all |
|
|
RUN npm run test:all |
|
|
|
|
|
|
|
|
CMD ["npm", "run", "build"] |
|
|
CMD ["npm", "run", "build"] |
|
|
|
|
|
@ -34,6 +34,7 @@ |
|
|
"antd": "^3.10.9", |
|
|
"antd": "^3.10.9", |
|
|
"bizcharts": "^3.4.0", |
|
|
"bizcharts": "^3.4.0", |
|
|
"bizcharts-plugin-slider": "^2.1.1-beta.1", |
|
|
"bizcharts-plugin-slider": "^2.1.1-beta.1", |
|
|
|
|
|
"@antv/data-set": "^0.10.0", |
|
|
"classnames": "^2.2.6", |
|
|
"classnames": "^2.2.6", |
|
|
"dva": "^2.4.0", |
|
|
"dva": "^2.4.0", |
|
|
"enquire-js": "^0.2.1", |
|
|
"enquire-js": "^0.2.1", |
|
|
@ -59,7 +60,6 @@ |
|
|
"react-router-dom": "^4.3.1" |
|
|
"react-router-dom": "^4.3.1" |
|
|
}, |
|
|
}, |
|
|
"devDependencies": { |
|
|
"devDependencies": { |
|
|
"@antv/data-set": "^0.10.0", |
|
|
|
|
|
"@types/react": "^16.7.7", |
|
|
"@types/react": "^16.7.7", |
|
|
"@types/react-dom": "^16.0.10", |
|
|
"@types/react-dom": "^16.0.10", |
|
|
"antd-pro-merge-less": "^0.2.0", |
|
|
"antd-pro-merge-less": "^0.2.0", |
|
|
|
|
|
@ -1,8 +0,0 @@ |
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
sudo apt-get update |
|
|
|
|
|
sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ |
|
|
|
|
|
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ |
|
|
|
|
|
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ |
|
|
|
|
|
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ |
|
|
|
|
|
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget |
|
|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
/* eslint-disable no-console */ |
|
|
const { spawn } = require('child_process'); |
|
|
const { spawn } = require('child_process'); |
|
|
const { kill } = require('cross-port-killer'); |
|
|
const { kill } = require('cross-port-killer'); |
|
|
|
|
|
|
|
|
@ -20,10 +21,8 @@ startServer.on('exit', () => { |
|
|
kill(process.env.PORT || 8000); |
|
|
kill(process.env.PORT || 8000); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// eslint-disable-next-line
|
|
|
|
|
|
console.log('Starting development server for e2e tests...'); |
|
|
console.log('Starting development server for e2e tests...'); |
|
|
startServer.stdout.on('data', data => { |
|
|
startServer.stdout.on('data', data => { |
|
|
// eslint-disable-next-line
|
|
|
|
|
|
console.log(data.toString()); |
|
|
console.log(data.toString()); |
|
|
if (!once && data.toString().indexOf('Compiled successfully') >= 0) { |
|
|
if (!once && data.toString().indexOf('Compiled successfully') >= 0) { |
|
|
// eslint-disable-next-line
|
|
|
// eslint-disable-next-line
|
|
|
|