Skip to content

Commit

Permalink
Merge branch 'master' into addUserInfo-naturalcrit#1908
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ambatte authored Mar 27, 2022
2 parents 5eedfdd + a1e7da8 commit 73d899e
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 15 deletions.
56 changes: 49 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1

orbs:
node: circleci/[email protected]

jobs:
build:
docker:
- image: circleci/node:16.10.0
- image: circleci/mongo:4.4
- image: cimg/node:16.11.0
- image: mongo:4.4

working_directory: ~/repo
working_directory: ~/homebrewery
executor: node/default

steps:
- checkout
- checkout:
path: ~/homebrewery

# Download and cache dependencies
- restore_cache:
Expand All @@ -21,12 +27,48 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install
- node/install-npm
- node/install-packages:
app-dir: ~/homebrewery
cache-path: node_modules
override-ci-command: npm i

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- persist_to_workspace:
root: .
paths:
- .

test:
docker:
- image: cimg/node:16.11.0

working_directory: ~/homebrewery
parallelism: 4

steps:
- attach_workspace:
at: .

# run tests!
- run: npm run circleci
- run:
name: Test - Basic
command: npm run test:basic
- run:
name: Test - Mustache Spans
command: npm run test:mustache-span
- run:
name: Test - Routes
command: npm run test:route

workflows:
build_and_test:
jobs:
- build
- test:
requires:
- build
7 changes: 5 additions & 2 deletions client/homebrew/homebrew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ const Homebrew = createClass({
}
};
},
componentWillMount : function() {
global.account = this.props.account;

getInitialState : function(){
global.version = this.props.version;
global.account = this.props.account;
global.enable_v3 = this.props.enable_v3;
return {};
},

render : function (){
return (
<Router location={this.props.url}>
Expand Down
10 changes: 4 additions & 6 deletions client/homebrew/navbar/navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ const Navbar = createClass({
};
},

componentDidMount : function() {
//const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
this.setState({
//showNonChromeWarning : !isChrome,
ver : window.version
});
getInitialState : function() {
return {
ver : global.version
};
},

/*
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"verify": "npm run lint && npm test",
"test": "jest",
"test:dev": "jest --verbose --watch",
"test:basic": "jest tests/markdown/basic.test.js --verbose",
"test:mustache-span": "jest tests/markdown/mustache-span.test.js --verbose",
"test:route": "jest tests/routes/static-pages.test.js --verbose",
"phb": "node scripts/phb.js",
"prod": "set NODE_ENV=production && npm run build",
"postinstall": "npm run buildall",
Expand All @@ -31,6 +34,7 @@
"build/*"
],
"jest": {
"testTimeout" : 15000,
"modulePaths": [
"mode_modules",
"shared",
Expand Down

0 comments on commit 73d899e

Please sign in to comment.