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

Commit 76fbe0f

Browse files
committed
Merge branch 'alpha' of https://github.com/withspectrum/spectrum into 2.1.9
2 parents 078a033 + 29ebd11 commit 76fbe0f

File tree

4 files changed

+67
-53
lines changed

4 files changed

+67
-53
lines changed

.circleci/config.yml

Lines changed: 64 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,38 @@ aliases:
2121
yarn
2222
cd ./mobile && yarn && yarn setup
2323

24+
- &install-rethinkdb
25+
name: Install RethinkDB 2.3.5
26+
command:
27+
|
28+
echo "deb http://download.rethinkdb.com/apt jessie main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
29+
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
30+
sudo apt-get update
31+
sudo apt-get install rethinkdb=2.3.5~0jessie
32+
33+
- &start-rethinkdb
34+
name: Start RethinkDB
35+
command: rethinkdb --bind all
36+
background: true
37+
38+
- &setup-and-build-web
39+
name: Setup and build
40+
command:
41+
|
42+
node -e "const setup = require('./shared/testing/setup.js')().then(() => process.exit())"
43+
yarn run build:web
44+
yarn run build:iris
45+
46+
- &start-iris
47+
name: Start Iris in the background
48+
command: TEST_DB=true yarn run dev:iris
49+
background: true
50+
51+
- &start-web
52+
name: Start web client in the background
53+
command: yarn run dev:web
54+
background: true
55+
2456
defaults: &defaults
2557
working_directory: ~/spectrum
2658

@@ -51,16 +83,8 @@ jobs:
5183
root: .
5284
paths: .
5385

54-
# Tests js of the mobile app
55-
test_mobile_js:
56-
<<: *js_defaults
57-
steps:
58-
- attach_workspace:
59-
at: ~/spectrum
60-
- run: cd ./mobile && yarn test:unit
61-
62-
# Test the web JS
63-
test_web_js:
86+
# Start db and servers, then run e2e and unit tests
87+
test_web:
6488
<<: *defaults
6589
docker:
6690
- image: circleci/node:8-browsers
@@ -71,41 +95,13 @@ jobs:
7195
steps:
7296
- attach_workspace:
7397
at: ~/spectrum
74-
- run:
75-
name: Install RethinkDB 2.3.5
76-
command:
77-
|
78-
echo "deb http://download.rethinkdb.com/apt jessie main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
79-
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
80-
sudo apt-get update
81-
sudo apt-get install rethinkdb=2.3.5~0jessie
82-
- run:
83-
name: Start RethinkDB
84-
command: rethinkdb --bind all
85-
background: true
98+
- run: *install-rethinkdb
99+
- run: *start-rethinkdb
86100
- run: sleep 10
87-
- run:
88-
name: Setup and build
89-
command:
90-
|
91-
node -e "const setup = require('./shared/testing/setup.js')().then(() => process.exit())"
92-
yarn run build:web
93-
yarn run build:iris
94-
- run:
95-
name: Start Iris in the background
96-
command: TEST_DB=true yarn run dev:iris
97-
background: true
98-
- run:
99-
name: Start web client in the background
100-
command: yarn run dev:web
101-
background: true
101+
- run: *setup-and-build-web
102+
- run: *start-iris
103+
- run: *start-web
102104
- run: sleep 60
103-
- run:
104-
name: Run Flow
105-
command: yarn run flow
106-
- run:
107-
name: Run ESLint
108-
command: yarn run lint
109105
- run:
110106
name: Run Unit Tests
111107
command: yarn run test:ci
@@ -117,6 +113,26 @@ jobs:
117113
when: always
118114
command: yarn run danger ci
119115

116+
# Run eslint, flow etc.
117+
test_static_js:
118+
<<: *js_defaults
119+
steps:
120+
- attach_workspace:
121+
at: ~/spectrum
122+
- run:
123+
name: Run Flow
124+
command: yarn run flow
125+
- run:
126+
name: Run ESLint
127+
command: yarn run lint
128+
129+
# Tests js of the mobile app
130+
test_mobile_js:
131+
<<: *js_defaults
132+
steps:
133+
- attach_workspace:
134+
at: ~/spectrum
135+
- run: cd ./mobile && yarn test:unit
120136

121137
# Tests native code of the mobile app
122138
test_mobile_native:
@@ -148,8 +164,7 @@ jobs:
148164
workflows:
149165
version: 2
150166

151-
# Tests mobile app
152-
test_mobile:
167+
test:
153168
jobs:
154169
- checkout_environment
155170
- test_mobile_js:
@@ -159,11 +174,9 @@ workflows:
159174
# - test_mobile_native:
160175
# requires:
161176
# - checkout_environment
162-
163-
# Tests web app
164-
test_web:
165-
jobs:
166-
- checkout_environment
167-
- test_web_js:
177+
- test_web:
178+
requires:
179+
- checkout_environment
180+
- test_static_js:
168181
requires:
169182
- checkout_environment

iris/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const createOrFindUser = (
184184
})
185185
.catch(err => {
186186
if (user.id) {
187-
console.log(err);
187+
console.error(err);
188188
return new Error(`No user found for id ${user.id}.`);
189189
}
190190
return storeUser(user);

iris/mutations/message/addMessage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default async (
175175
};
176176
})
177177
.catch(err => {
178-
console.log('Error sending message', err);
178+
console.error('Error sending message', err);
179179
return new UserError('Error sending message, please try again');
180180
});
181181
};

src/components/chatInput/components/style.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @flow
12
import styled from 'styled-components';
23
import { zIndex } from 'src/components/globals';
34

0 commit comments

Comments
 (0)