ci: better run-parallel error log

This commit is contained in:
Sérgio Ramos 2017-06-01 15:57:28 +01:00
parent 46ff73d82a
commit 0503802282
36 changed files with 60 additions and 77 deletions

View File

@ -22,11 +22,14 @@ dependencies:
test:
pre:
# mkdir lint reports
- mkdir -p $CIRCLE_TEST_REPORTS/lint
- mkdir -p $CIRCLE_TEST_REPORTS/lint:
parallel: true
# mkdir test reports
- mkdir -p $CIRCLE_TEST_REPORTS/test
- mkdir -p $CIRCLE_TEST_REPORTS/test:
parallel: true
# mkdir coverage artifact folders
- ls -1 packages | xargs -I % mkdir -p $CIRCLE_ARTIFACTS/"%"
- ls -1 packages | xargs -I % mkdir -p $CIRCLE_ARTIFACTS/"%":
parallel: true
override:
# lint
- ./scripts/parallel-run --cmd="lint-ci":
@ -48,7 +51,6 @@ deployment:
- sudo chmod +x /usr/local/bin/docker-compose
# install and setup triton
- yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
development:
branch: master
commands:

View File

@ -18,7 +18,7 @@
"lint": "redrun -s lint:*",
"test": "lerna run test",
"lint-ci": "eslint scripts/* --format junit --output-file $CIRCLE_TEST_REPORTS/lint/container-pilot-dashboard.xml",
"test-ci": "exit 0",
"test-ci": "echo 0",
"clean": "lerna clean --yes",
"bootstrap": "lerna bootstrap",
"dev": "redrun -p dev:*",

View File

@ -7,8 +7,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/babel-preset-joyent-portal.xml",
"test": "exit 0",
"test-ci": "exit 0"
"test": "echo 0",
"test-ci": "echo 0"
},
"dependencies": {
"babel-preset-react-app": "^3.0.0"

View File

@ -8,8 +8,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cloudapi-gql.xml",
"test": "exit 0",
"test-ci": "exit 0",
"test": "echo 0",
"test-ci": "echo 0",
"start": "node src/index.js"
},
"dependencies": {

View File

@ -8,14 +8,14 @@
"scripts": {
"start": "PORT=3069 react-scripts start",
"build": "react-scripts build",
"lint:css": "exit 0",
"lint:css": "echo 0",
"lint:js": "eslint . --fix",
"lint": "redrun -s lint:*",
"lint-ci:css": "exit 0",
"lint-ci:css": "echo 0",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-frontend.xml",
"lint-ci": "redrun -p lint-ci:*",
"test": "exit 0",
"test-ci": "exit 0",
"test": "echo 0",
"test-ci": "echo 0",
"postinstall": "node scripts/postinstall"
},
"dependencies": {

View File

@ -1,12 +1,9 @@
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
const originalConfig = require('./webpack.config.dev.original');
const FRONTEND_ROOT = process.cwd();
const FRONTEND = path.join(FRONTEND_ROOT, 'src');
const STATIC = path.join(FRONTEND_ROOT, 'static');
const ESLINT = path.join(FRONTEND_ROOT, '.eslintrc');
const rules = originalConfig.module.rules.reduce((loaders, loader, index) => {
if (index === 3) {

View File

@ -1,6 +1,4 @@
import styled from 'styled-components';
import { Grid } from 'react-styled-flexboxgrid';
import { breakpoints } from 'joyent-ui-toolkit';
export default Grid.extend`

View File

@ -2,7 +2,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { NavLink } from 'react-router-dom';
import remcalc from 'remcalc';

View File

@ -75,7 +75,6 @@ const DeploymentGroupList = ({
DeploymentGroupList.propTypes = {
deploymentGroups: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string,
id: PropTypes.string,
name: PropTypes.string
})

View File

@ -28,8 +28,6 @@ export default handleActions(
quickActions
}
};
return state;
}
},
{}

View File

@ -1,5 +1,5 @@
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
import { enableBatching } from 'redux-batched-actions';
// import { enableBatching } from 'redux-batched-actions';
import { ApolloClient, createNetworkInterface } from 'react-apollo';
import state from './state';
import { ui } from './reducers';

View File

@ -8,8 +8,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-mock-server.xml",
"test": "exit 0",
"test-ci": "exit 0",
"test": "echo 0",
"test-ci": "echo 0",
"start": "node src/index.js",
"dev": "nodemon src/index.js"
},

View File

@ -8,8 +8,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-schema.xml",
"test": "exit 0",
"test-ci": "exit 0"
"test": "echo 0",
"test-ci": "echo 0"
},
"dependencies": {},
"devDependencies": {

View File

@ -7,8 +7,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-rdb-bootstrap.xml",
"test": "exit 0",
"test-ci": "exit 0"
"test": "echo 0",
"test-ci": "echo 0"
},
"devDependencies": {
"eslint": "^3.19.0",

View File

@ -7,8 +7,8 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/eslint-config-joyent-portal.xml",
"test": "exit 0",
"test-ci": "exit 0"
"test": "echo 0",
"test-ci": "echo 0"
},
"peerDependencies": {
"babel-eslint": "^7.2.3",

View File

@ -18,8 +18,8 @@
"module": "dist/normalized-styled-components.es.js",
"entry": "src/index.js",
"scripts": {
"lint:css": "exit 0",
"lint-ci:css": "exit 0",
"lint:css": "echo 0",
"lint-ci:css": "echo 0",
"lint:js": "eslint . --fix",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/normalized-styled-components.xml",
"lint": "redrun -s lint:*",

View File

@ -301,12 +301,12 @@ exports[`renders <Menu /> correctly 1`] = `
`;
exports[`renders <Nav /> correctly 1`] = `
.jRYaVX {
.eayfNy {
display: block;
}
<menu
className="src__Menu-jiUApB jRYaVX"
<nav
className="src__Nav-iOoeuf eayfNy"
/>
`;

View File

@ -66,7 +66,7 @@ it('renders <Header /> correctly', () => {
});
it('renders <Nav /> correctly', () => {
const tree = renderer.create(<Menu />).toJSON();
const tree = renderer.create(<Nav />).toJSON();
expect(tree).toMatchStyledComponentsSnapshot();
});

View File

@ -10,7 +10,7 @@
"lint": "belly-button --fix",
"lint-ci": "belly-button",
"test": "lab -t 97",
"test-ci": "exit 0"
"test-ci": "echo 0"
},
"keywords": [],
"author": "wyatt",

View File

@ -10,7 +10,7 @@
"lint": "belly-button --fix",
"lint-ci": "belly-button",
"test": "lab -t 40",
"test-ci": "exit 0"
"test-ci": "echo 0"
},
"keywords": [],
"author": "wyatt",

View File

@ -7,14 +7,14 @@
"main": "dist/index.js",
"module": "dist/index.js",
"scripts": {
"lint:css": "exit 0",
"lint-ci:css": "exit 0",
"lint:css": "echo 0",
"lint-ci:css": "echo 0",
"lint:js": "eslint . --fix",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/ui-toolkit.xml",
"lint": "redrun -s lint:*",
"lint-ci": "redrun -s lint-ci:*",
"test": "exit 0",
"test-ci": "exit 0",
"test": "echo 0",
"test-ci": "echo 0",
"copy-fonts": "rm -rf dist; mkdir -p dist/typography; cp -r src/typography/libre-franklin dist/typography",
"compile": "babel src --out-dir dist --source-maps inline",
"watch": "cross-env NODE_ENV=development redrun -s -c copy-fonts \"compile --watch\"",

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Broadcast, Subscriber } from 'react-broadcast';
import Baseline from '../baseline';
import paperEffect from '../paper-effect';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import remcalc from 'remcalc';
import Baseline from '../baseline';
import View from './view';

View File

@ -1,5 +1,4 @@
import React from 'react';
import styled from 'styled-components';
import { Broadcast, Subscriber } from 'react-broadcast';
import remcalc from 'remcalc';
import PropTypes from 'prop-types';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Row, Col } from 'react-styled-flexboxgrid';
import { Subscriber } from 'react-broadcast';
import Baseline from '../baseline';

View File

@ -4,7 +4,6 @@ import Baseline from '../baseline';
import { Col } from 'react-styled-flexboxgrid';
import is from 'styled-is';
import remcalc from 'remcalc';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import React from 'react';

View File

@ -1,5 +1,4 @@
import { Subscriber } from 'react-broadcast';
import styled from 'styled-components';
import Baseline from '../baseline';
import remcalc from 'remcalc';
import is from 'styled-is';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Fieldset } from 'normalized-styled-components';
import Baseline from '../baseline';

View File

@ -1,6 +1,5 @@
import React from 'react';
import { Subscriber } from 'react-broadcast';
import styled from 'styled-components';
import remcalc from 'remcalc';
import Label from '../label';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Legend } from 'normalized-styled-components';
import Baseline from '../baseline';
import typography from '../typography';

View File

@ -2,7 +2,6 @@ import { Subscriber } from 'react-broadcast';
import is from 'styled-is';
import Baseline from '../baseline';
import breakpoints from '../breakpoints';
import styled from 'styled-components';
import Label from '../label';
import PropTypes from 'prop-types';
import React from 'react';

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import styled from 'styled-components';
// import styled from 'styled-components';
class Modal extends Component {
render() {

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Small } from 'normalized-styled-components';
import remcalc from 'remcalc';
import typography from '../typography';

View File

@ -1,5 +1,4 @@
import React from 'react';
import styled from 'styled-components';
import { Svg } from 'normalized-styled-components';
import PropTypes from 'prop-types';

View File

@ -156,21 +156,12 @@ const deploy = async () => {
});
// up project
return execa(
'docker-compose',
[
'up',
'-d',
'--build',
'--force-recreate'
],
{
return execa('docker-compose', ['up', '-d', '--build', '--force-recreate'], {
stdio: 'inherit',
env: Object.assign({}, env, {
COMPOSE_PROJECT_NAME
})
}
);
});
};
const run = async () => {

View File

@ -3,6 +3,7 @@
const argv = require('yargs').argv;
const forEach = require('apr-for-each');
const main = require('apr-main');
const intercept = require('apr-intercept');
const execa = require('execa');
const path = require('path');
@ -13,11 +14,21 @@ if (!argv.cmd) {
}
const run = () =>
forEach(argv._, file =>
forEach(argv._, async file => {
const cwd = path.dirname(path.join(ROOT, file));
const [err] = await intercept(
execa('yarn', ['run', argv.cmd], {
cwd: path.dirname(path.join(ROOT, file)),
stdio: 'inherit'
stdio: 'inherit',
cwd
})
);
if (err) {
console.error(`cmd: ${argv.cmd} | cwd: ${cwd}`);
console.error(err);
throw err;
}
});
main(run());