Skip to content

Commit c20c0f0

Browse files
committed
chore: add build test for site
1 parent aa33094 commit c20c0f0

File tree

6 files changed

+13261
-7761
lines changed

6 files changed

+13261
-7761
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build Site Test
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
paths:
8+
- "web/**"
9+
10+
jobs:
11+
lint:
12+
name: ESLint
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Setup Bun
20+
uses: oven-sh/setup-bun@v1
21+
22+
- name: Install dependencies
23+
run: bun install
24+
25+
- name: Run ESLint
26+
run: bun run build

.github/workflows/eslint.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- '*'
7-
pull_request:
8-
types: [opened, reopened, synchronize]
97

108
jobs:
119
lint:
@@ -16,13 +14,11 @@ jobs:
1614
- name: Checkout code
1715
uses: actions/checkout@v2
1816

19-
- name: Setup Node.js
20-
uses: actions/setup-node@v2
21-
with:
22-
node-version: '20'
17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v1
2319

2420
- name: Install dependencies
25-
run: npm install
21+
run: bun install
2622

2723
- name: Run ESLint
28-
run: npm run lint
24+
run: bun run lint

api/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ app.use(express.static(path.join(__dirname, "public")));
1212
app.set("view engine", "ejs");
1313
app.set("views", path.join(__dirname, "views"));
1414

15+
app.disable("x-powered-by");
16+
1517
console.log("Initializing tables...");
1618
await initTables();
1719
console.log("Tables initialized");
@@ -567,7 +569,7 @@ async function syncFromMee6(guild: string) {
567569
const users = data.players;
568570
let pageNumber = 1;
569571
// this is needed because MEE6 doesn't give us the total amount of pages
570-
// eslint-disable-next-line no-constant-condition
572+
571573
while (true) {
572574
const res = await fetch(`https://mee6.xyz/api/plugins/levels/leaderboard/${guild}?limit=1000&page=${pageNumber}`);
573575
const data = await res.json();
@@ -636,7 +638,7 @@ async function syncFromLurkr(guild: string) {
636638

637639
let pageNumber = 2;
638640
// this is needed because Lurkr doesn't give us the total amount of pages
639-
// eslint-disable-next-line no-constant-condition
641+
640642
while (true) {
641643
const res = await fetch(`https://api.lurkr.gg/v2/levels/${guild}?page=${pageNumber}`);
642644
const data = await res.json();

bun.lockb

1.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)