0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Merge branch 'master' into addLocalLogin-#269

This commit is contained in:
G.Ambatte
2022-03-27 17:15:41 +13:00
committed by GitHub
4 changed files with 61 additions and 14 deletions

View File

@@ -2,17 +2,23 @@
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1
orbs:
node: circleci/node@3.0.0
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:
@@ -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

View File

@@ -32,13 +32,16 @@ const Homebrew = createClass({
}
};
},
getInitialState : function() {
global.account = this.props.account;
global.version = this.props.version;
global.enable_v3 = this.props.enable_v3;
global.config = this.props.config;
return {};
return {};
},
render : function (){
return (
<Router location={this.props.url}>

View File

@@ -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
};
},
/*

View File

@@ -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",
@@ -31,6 +34,7 @@
"build/*"
],
"jest": {
"testTimeout" : 15000,
"modulePaths": [
"mode_modules",
"shared",