Unverified Commit 0745731b authored by 陈帅's avatar 陈帅 Committed by GitHub

use node:latest-browsers images (#2966)

* use node:latest-browsers images

* fix no-extraneous-dependencies error
parent 949151dc
......@@ -9,10 +9,9 @@ jobs:
- run: npm run build
test:
docker:
- image: circleci/node:latest
- image: circleci/node:latest-browsers
steps:
- checkout
- run: sh ./tests/fix_puppeteer.sh
- run: npm install
- run:
command : npm run test:all
......
/functions/mock
/tests/*
./*
\ No newline at end of file
/functions/mock/**
\ No newline at end of file
......@@ -22,7 +22,10 @@ module.exports = {
'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }],
'import/no-extraneous-dependencies': [
2,
{ optionalDependencies: true, devDependencies: false },
{
optionalDependencies: true,
devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'],
},
],
'jsx-a11y/no-noninteractive-element-interactions': 0,
'jsx-a11y/click-events-have-key-events': 0,
......
FROM circleci/node:latest
FROM circleci/node:latest-browsers
WORKDIR /usr/src/app/
USER root
......@@ -7,13 +7,6 @@ RUN yarn
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
CMD ["npm", "run", "build"]
#!/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
/* eslint-disable no-console */
const { spawn } = require('child_process');
const { kill } = require('cross-port-killer');
......@@ -20,10 +21,8 @@ startServer.on('exit', () => {
kill(process.env.PORT || 8000);
});
// eslint-disable-next-line
console.log('Starting development server for e2e tests...');
startServer.stdout.on('data', data => {
// eslint-disable-next-line
console.log(data.toString());
if (!once && data.toString().indexOf('Compiled successfully') >= 0) {
// eslint-disable-next-line
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment