File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939
4040 - name : Post comment
4141 if : steps.fc.outputs.comment-id == '' && always()
42+ continue-on-error : true
4243 uses : actions/github-script@v5
4344 with :
4445 script : |
5152
5253 - name : Update comment
5354 if : steps.fc.outputs.comment-id != '' && always()
55+ continue-on-error : true
5456 uses : peter-evans/create-or-update-comment@v1
5557 with :
5658 edit-mode : replace
Original file line number Diff line number Diff line change 2121 with :
2222 node-version : 18
2323 - run : npm ci
24- - run : npm run test
24+
25+ - name : Type checker
26+ run : npm run typings
27+
28+ # This step won't run when coming from a fork
29+ - name : Test suite
30+ run : npm run test
2531 if : contains(env.VITE_SERVER, '.')
2632 env :
2733 VITE_SERVER : ${{ secrets.VITE_SERVER }}
Original file line number Diff line number Diff line change @@ -14,12 +14,31 @@ const testConfig = new JsonConfig();
1414export const CONNECTION_TIMEOUT = process . env . VITE_CONNECTION_TIMEOUT ? parseInt ( process . env . VITE_CONNECTION_TIMEOUT ) : 25000 ;
1515
1616const ENV_CREDS = {
17- host : process . env . VITE_SERVER || `localhost` ,
17+ host : process . env . VITE_SERVER ,
1818 user : process . env . VITE_DB_USER ,
1919 password : process . env . VITE_DB_PASS ,
2020 port : parseInt ( process . env . VITE_DB_PORT || `22` )
2121}
2222
23+ if ( ENV_CREDS . host === undefined ) {
24+ const messages = [
25+ `` ,
26+ `Please set the environment variables:` ,
27+ `\tVITE_SERVER` ,
28+ `\tVITE_DB_USER` ,
29+ `\tVITE_DB_PASS` ,
30+ `\tVITE_DB_PORT` ,
31+ `` ,
32+ `If you're a developer, make a copy of .env.sample,` ,
33+ `rename it to .env, and set the values.` ,
34+ `` ,
35+ ] ;
36+
37+ console . log ( messages . join ( `\n` ) ) ;
38+
39+ process . exit ( 1 ) ;
40+ }
41+
2342export async function newConnection ( ) {
2443 const virtualStorage = testStorage ;
2544
You can’t perform that action at this time.
0 commit comments