Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI #83

Merged
merged 2 commits into from Apr 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions bin/test
@@ -1,13 +1,22 @@
#!/usr/bin/env bash

# Exit if something fails
set -e

npm run lint
npm run typescript

# Unit test React 15 and collect coverage
npm run react:15
npm run unit -- --coverage
mv coverage/coverage-final.json coverage/coverage-react15.json

# Unit test React 16 and collect coverage
npm run react:16
npm run unit -- --coverage
mv coverage/coverage-final.json coverage/coverage-react16.json

# Combine unit test coverage
mkdir -p .nyc_output
npx istanbul-merge \
--out .nyc_output/coverage-final.json \
Expand All @@ -16,11 +25,15 @@ npx istanbul-merge \

rm -rf coverage

# Report coverage to coveralls.io
npx nyc report --reporter=text-lcov | npx coveralls
# Report coverage so that danger-plugin-istanbul-coverage can find it
npx nyc report --reporter=json-summary

# PR info bot
npm run danger

# Attempt to run E2E tests
if [ -z "$SAUCE_USERNAME" ] && [ -z "$SAUCE_ACCESS_KEY"]; then
echo
echo "ATTENTION"
Expand Down
6 changes: 3 additions & 3 deletions example/index.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { injectGlobal } from 'styled-components';
import Theme from './components/theme';
import ThemeProvider from './components/theme';
import Body from './components/body';
import Page from './components/page';
import PageTitle from './components/page-title';
Expand Down Expand Up @@ -30,7 +30,7 @@ const HidesOnMobileSection = Section.extend`
class App extends Component {
render() {
return (
<Theme>
<ThemeProvider>
<Body>
<Page>
<PageTitle>React Tether</PageTitle>
Expand Down Expand Up @@ -83,7 +83,7 @@ class App extends Component {
</Section>
</Page>
</Body>
</Theme>
</ThemeProvider>
);
}
}
Expand Down