Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

gitlab testing & build processes #2090

Merged
merged 7 commits into from
Sep 19, 2016
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stages:
- deploy
variables:
GIT_DEPTH: "3"
SIMPLECOV: "true"
SIMPLECOV: "true"
RUST_BACKTRACE: "1"
cache:
key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
Expand Down Expand Up @@ -244,7 +244,9 @@ test-linux:
stage: test
before_script:
- git submodule update --init --recursive
- ./js/scripts/install-deps.sh
script:
- ./js/scripts/test.sh
- ./test.sh --verbose
tags:
- rust-test
Expand Down
10 changes: 0 additions & 10 deletions js/scripts/check-master.sh

This file was deleted.

33 changes: 0 additions & 33 deletions js/scripts/deploy-to-gh-pages.sh

This file was deleted.

15 changes: 15 additions & 0 deletions js/scripts/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# change into the js directory (one down from scripts)
pushd `dirname $0`
cd ..

# install deps and store the exit code
npm install
EXICCODE=$?

# back to root
popd

# exit with exit code
exit $EXITCODE
15 changes: 15 additions & 0 deletions js/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# change into the js directory (one down from scripts)
pushd `dirname $0`
cd ..

# run lint & tests and store the exit code
npm run lint && npm run test
EXICCODE=$?

# back to root
popd

# exit with exit code
exit $EXITCODE
2 changes: 1 addition & 1 deletion js/src/api/transport/ws/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class Ws extends JsonRpcBase {

_onMessage = (event) => {
const result = JSON.parse(event.data);
const {resolve, reject} = this._messages[result.id];
const { resolve, reject } = this._messages[result.id];

if (result.error) {
this.error(event.data);
Expand Down
8 changes: 3 additions & 5 deletions js/src/dapps/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ import './style.css';
import './registry.html';

ReactDOM.render(
(
<Provider store={ store }>
<Container />
</Provider>
),
<Provider store={ store }>
<Container />
</Provider>,
document.querySelector('#container')
);
2 changes: 2 additions & 0 deletions js/src/dapps/registry/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export default class Application extends Component {
}

Application.propTypes = {
actions: PropTypes.object,
contract: PropTypes.object,
fee: PropTypes.object,
lookup: PropTypes.object,
owner: PropTypes.string
};
9 changes: 6 additions & 3 deletions js/src/dapps/registry/Lookup/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@ const initialState = {
};

export default (state = initialState, action) => {
if (action.type === 'lookup start')
if (action.type === 'lookup start') {
return {
pending: true,
name: action.name, key: action.key,
result: null
};
}

if (action.type === 'lookup error')
if (action.type === 'lookup error') {
return {
pending: false,
name: null, key: null,
result: null
};
}

if (action.type === 'lookup success')
if (action.type === 'lookup success') {
return {
pending: false,
name: null, key: null,
result: action.result
};
}

return state;
};
9 changes: 6 additions & 3 deletions js/src/dapps/registry/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ const initialState = {
};

export default (state = initialState, action) => {
if (action.type === 'set contract')
if (action.type === 'set contract') {
return { ...state, contract: action.contract };
}

if (action.type === 'set fee')
if (action.type === 'set fee') {
return { ...state, fee: action.fee };
}

if (action.type === 'set owner')
if (action.type === 'set owner') {
return { ...state, owner: action.owner };
}

if (action.type.slice(0, 6) === 'lookup') {
return { ...state, lookup: lookupReducer(state.lookup, action) };
Expand Down