Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: CI

on:
push:
branches: [main]

pull_request:
branches: [main]
push:
branches: [main]

jobs:
build-and-test:
Expand All @@ -17,11 +18,13 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
node-version: "18"

- name: Install dependencies
run: npm install



- name: Build TypeScript
run: npm run build

Expand All @@ -31,6 +34,8 @@ jobs:
- name: Run ESLint
run: npm run lint



# FOR IT TO WORK WITH GITHUB Actions and push to Docker registry do the following
# In your repo settings, go to Settings → Secrets and variables → Actions → Secrets, and add:
# DOCKER_USERNAME – your Docker Hub username
Expand Down
3 changes: 3 additions & 0 deletions src/LedBlue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function isLedBlue(red: boolean, green: boolean, blue: boolean): boolean{
return red == false && green == false && blue == true;
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ app.get("/", (req: Request, res: Response) => {
// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});
});
2 changes: 2 additions & 0 deletions src/test/ledBlue.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { describe, it, expect } from "vitest";
import { isOverheating } from "../temperature";
Loading