-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ coverage | |
public/js/ | ||
bin/ | ||
dist/ | ||
|
||
# Lighthouse audit report files | ||
.lighthouseci/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- '8' | ||
- '10' | ||
services: mongodb | ||
branches: | ||
only: | ||
- master | ||
cache: | ||
directories: | ||
- node_modules | ||
- dist | ||
- .cache | ||
- bin | ||
before_install: | ||
- npm update | ||
install: | ||
- npm install | ||
script: | ||
- npm run webpack | ||
- ./scripts/lighthouse.sh | ||
- npm run lint | ||
- npm run test | ||
- npm run coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"ci": { | ||
"assert": { | ||
"assertions": { | ||
"categories.pwa": "off", | ||
"categories:performance": ["warm", { "minScore": 0.1 }], | ||
"categories:accessibility": ["error", { "minScore": 0.25 }], | ||
"categories:best-practices": ["error", { "minScore": 0.6 }], | ||
"categories:seo": ["error", { "minScore": 0.5 }] | ||
} | ||
}, | ||
"collect": { | ||
"url": "http://localhost:5000" | ||
}, | ||
"upload": { | ||
"target": "temporary-public-storage" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
startserver() { | ||
echo "starting server" | ||
node bin/server.js & | ||
pid1=$! | ||
echo "PID is $pid1"; | ||
|
||
} | ||
|
||
stopserver() { | ||
echo "Killing all node processes" | ||
kill $pid1; | ||
echo "Exiting with code $RETURN_CODE" | ||
exit $RETURN_CODE | ||
} | ||
|
||
# Wait for a service to be up Since I don't know how much time it will take | ||
wait_for_service() { | ||
echo "> Waiting for $1 to be ready... " | ||
sleep 2 | ||
} | ||
|
||
wait_for_app_services() { | ||
echo "" | ||
wait_for_service Server 127.0.0.1 5000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
RETURN_CODE=0 | ||
|
||
. ./scripts/funtions.sh | ||
startserver | ||
sleep 3 | ||
echo "" | ||
echo "> Running lighthouse" | ||
npx lhci autorun | ||
RETURN_CODE=$? | ||
|
||
stopserver | ||
|
||
|
||
exit $RETURN_CODE |