Compare commits

...

7 commits

Author SHA1 Message Date
2b0c8208f6
Merge branch 'main' into get-endpoint
Some checks failed
Run node --check on everything / node-check (push) Successful in 7s
Make sure the server is actually able to start / prettier (push) Successful in 23s
Check project using prettier / prettier (push) Failing after 20s
2024-05-24 19:48:32 +00:00
6116df713d
Run prettier
All checks were successful
Run node --check on everything / node-check (pull_request) Successful in 8s
Make sure the server is actually able to start / prettier (pull_request) Successful in 39s
Check project using prettier / prettier (pull_request) Successful in 43s
Run node --check on everything / node-check (push) Successful in 6s
Make sure the server is actually able to start / prettier (push) Successful in 40s
Check project using prettier / prettier (push) Successful in 36s
2024-05-24 18:30:09 +00:00
118b3643e7
Run actions on all branches + PRs
Some checks failed
Run node --check on everything / node-check (push) Successful in 12s
Check project using prettier / prettier (push) Failing after 25s
Make sure the server is actually able to start / prettier (push) Successful in 39s
2024-05-24 18:28:30 +00:00
56f1591b6e
Merge branch 'boot-test-workflow'
All checks were successful
Make sure the server is actually able to start / prettier (push) Successful in 19s
Run node --check on everything / node-check (push) Successful in 4s
Check project using prettier / prettier (push) Successful in 9s
This will hopefully make sure that the server actually starts before
giving that coveted "tests passed" status.
2024-05-24 18:07:01 +00:00
12cceb99cd
Handle the listen socket not existing correctly
All checks were successful
Run node --check on everything / node-check (push) Successful in 7s
Check project using prettier / prettier (push) Successful in 19s
2024-05-24 18:06:33 +00:00
c05b6f1a8a
Fix a bug 2024-05-24 18:04:26 +00:00
527880457c
Add a test that makes sure that the server can start successfully 2024-05-24 18:01:01 +00:00
4 changed files with 33 additions and 4 deletions

View file

@ -0,0 +1,17 @@
name: "Make sure the server is actually able to start"
author: "9pfs@amcforum.wiki (h @ nest)"
on:
push:
branches:
- "*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
prettier:
runs-on: docker
steps:
- uses: actions/checkout@v3
- id: dependencies
run: NODE_ENV=development npm ci
- id: boot-test
run: TEST_MODE=boot LISTEN_PATH=/tmp/webserver.sock node index.js

View file

@ -3,7 +3,9 @@ author: "9pfs@amcforum.wiki (h @ nest)"
on:
push:
branches:
- main
- "*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
node-check:
runs-on: docker

View file

@ -3,7 +3,9 @@ author: "9pfs@amcforum.wiki (h @ nest)"
on:
push:
branches:
- main
- "*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
prettier:
runs-on: docker

View file

@ -102,6 +102,14 @@ const listen_path =
? "/run/user/2123/countify/webserver.sock"
: "/run/user/2123/countify-dev.sock";
if (listen_path[0] == "/") {
await unlink(listen_path);
try {
await unlink(listen_path);
} catch (e) {}
}
const listener = app.listen(listen_path);
if (process.env?.TEST_MODE == "boot") {
console.log("Server started successfully.");
// We've successfully started. Time to shut down.
listener.close();
process.exit(0);
}
app.listen(listen_path);