-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ahoy.yml
81 lines (78 loc) · 2.59 KB
/
.ahoy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
ahoyapi: v2
usage: Commands for running and updating stackbot
commands:
up:
usage: run stackbot locally.
cmd: |
cd default && npm run build -- --watch=true &
dev_appserver.py --skip_sdk_update_check=true default backend
front-build:
usage: build the frontend files.
cmd: cd default && npm run build -- --watch=true
pip-install:
usage: python pip, but locally vendored.
cmd: cd backend && pip install --ignore-installed --force-reinstall --upgrade -t lib {{args}}
console:
usage: open the app engine web python console.
cmd: open 'http://localhost:8000/console'
deploy:
usage: deploy the app to google app engine
cmd: |
set -e
cd default && npm run build-prod && cd ../
appcfg.py -A devinci-stackbot -V {{args}} update default
appcfg.py -A devinci-stackbot -V {{args}} update backend
deps-frontend:
usage: Load and install all dependencies.
cmd: |
#npm install -g angular-cli typings
cd default && rm -rf node_modules typings
npm install
deps-backend:
usage: Load and install all backend dependencies.
cmd: |
cd backend &&
ahoy pip-install -- -r requirements.txt
pip install pylint
build:
cmd: cd default && npm run build
usage: Build all of the files necessary to serve the site into the /dist folder.
build-prod:
cmd: cd default && npm run build-prod
usage: Build all of the files necessary to serve the site into the /dist folder.
test-frontend:
usage: Run the frontend unit tests.
cmd: |
set -e
cd default &&
if [ $CIRCLE_TEST_REPORTS ]; then
echo '> Adding junit output to $CIRCLE_TEST_REPORTS'
export JUNIT_DIR=$CIRCLE_TEST_REPORTS
FLAGS='--reporters=junit,progress'
fi
npm run test -- $FLAGS {{args}}
npm run lint
test-backend:
usage: Run the backend unit tests.
cmd: |
set -e
if [ -z "$APPENGINE" ]; then
echo "You need to set your \$APPENGINE env var to the path of your appengine sdk. Usually /usr/local/google_appengine."
exit 1
elif [ ! -d "$APPENGINE" ]; then
echo "\$APPENGINE is set, but the path '$APPENGINE' doesn't exist."
exit 1
fi
cd backend &&
python run_tests.py $APPENGINE tests
pylint -j0 -E handlers models shared tests stackbot_backend.py
test:
usage: Run all the tests (backend and frontend)
cmd: |
set -e
ahoy test-backend
ahoy test-frontend
proxy:
usage: Run a local proxy to use a dev version of stackbot.
cmd: |
cd default && sudo node proxy-server.js