Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Merge branch 'alpha' of https://github.com/withspectrum/spectrum into…
Browse files Browse the repository at this point in the history
… 2.1.9
  • Loading branch information
brianlovin committed Mar 19, 2018
2 parents 078a033 + 29ebd11 commit 76fbe0f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 53 deletions.
115 changes: 64 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,38 @@ aliases:
yarn
cd ./mobile && yarn && yarn setup

- &install-rethinkdb
name: Install RethinkDB 2.3.5
command:
|
echo "deb http://download.rethinkdb.com/apt jessie main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb=2.3.5~0jessie

- &start-rethinkdb
name: Start RethinkDB
command: rethinkdb --bind all
background: true

- &setup-and-build-web
name: Setup and build
command:
|
node -e "const setup = require('./shared/testing/setup.js')().then(() => process.exit())"
yarn run build:web
yarn run build:iris

- &start-iris
name: Start Iris in the background
command: TEST_DB=true yarn run dev:iris
background: true

- &start-web
name: Start web client in the background
command: yarn run dev:web
background: true

defaults: &defaults
working_directory: ~/spectrum

Expand Down Expand Up @@ -51,16 +83,8 @@ jobs:
root: .
paths: .

# Tests js of the mobile app
test_mobile_js:
<<: *js_defaults
steps:
- attach_workspace:
at: ~/spectrum
- run: cd ./mobile && yarn test:unit

# Test the web JS
test_web_js:
# Start db and servers, then run e2e and unit tests
test_web:
<<: *defaults
docker:
- image: circleci/node:8-browsers
Expand All @@ -71,41 +95,13 @@ jobs:
steps:
- attach_workspace:
at: ~/spectrum
- run:
name: Install RethinkDB 2.3.5
command:
|
echo "deb http://download.rethinkdb.com/apt jessie main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb=2.3.5~0jessie
- run:
name: Start RethinkDB
command: rethinkdb --bind all
background: true
- run: *install-rethinkdb
- run: *start-rethinkdb
- run: sleep 10
- run:
name: Setup and build
command:
|
node -e "const setup = require('./shared/testing/setup.js')().then(() => process.exit())"
yarn run build:web
yarn run build:iris
- run:
name: Start Iris in the background
command: TEST_DB=true yarn run dev:iris
background: true
- run:
name: Start web client in the background
command: yarn run dev:web
background: true
- run: *setup-and-build-web
- run: *start-iris
- run: *start-web
- run: sleep 60
- run:
name: Run Flow
command: yarn run flow
- run:
name: Run ESLint
command: yarn run lint
- run:
name: Run Unit Tests
command: yarn run test:ci
Expand All @@ -117,6 +113,26 @@ jobs:
when: always
command: yarn run danger ci

# Run eslint, flow etc.
test_static_js:
<<: *js_defaults
steps:
- attach_workspace:
at: ~/spectrum
- run:
name: Run Flow
command: yarn run flow
- run:
name: Run ESLint
command: yarn run lint

# Tests js of the mobile app
test_mobile_js:
<<: *js_defaults
steps:
- attach_workspace:
at: ~/spectrum
- run: cd ./mobile && yarn test:unit

# Tests native code of the mobile app
test_mobile_native:
Expand Down Expand Up @@ -148,8 +164,7 @@ jobs:
workflows:
version: 2

# Tests mobile app
test_mobile:
test:
jobs:
- checkout_environment
- test_mobile_js:
Expand All @@ -159,11 +174,9 @@ workflows:
# - test_mobile_native:
# requires:
# - checkout_environment

# Tests web app
test_web:
jobs:
- checkout_environment
- test_web_js:
- test_web:
requires:
- checkout_environment
- test_static_js:
requires:
- checkout_environment
2 changes: 1 addition & 1 deletion iris/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const createOrFindUser = (
})
.catch(err => {
if (user.id) {
console.log(err);
console.error(err);
return new Error(`No user found for id ${user.id}.`);
}
return storeUser(user);
Expand Down
2 changes: 1 addition & 1 deletion iris/mutations/message/addMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default async (
};
})
.catch(err => {
console.log('Error sending message', err);
console.error('Error sending message', err);
return new UserError('Error sending message, please try again');
});
};
1 change: 1 addition & 0 deletions src/components/chatInput/components/style.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @flow
import styled from 'styled-components';
import { zIndex } from 'src/components/globals';

Expand Down

0 comments on commit 76fbe0f

Please sign in to comment.