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
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
kname: ci

on:
pull_request:
branches: [main]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm run test -- --coverage

style:
name: Style
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci

- name: Check Formatting
run: npm run format:check
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# learn-cicd-typescript-starter (Notely)
# learn-cicd-typescript-starter

![Tests](https://github.com/RashaQasrawi/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)

This is my version of Boot.dev's Notely app.

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).

Expand All @@ -22,3 +26,5 @@ npm run dev
_This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`.

You do _not_ need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course!

Rasha's version of Boot.dev's Notely app.
15 changes: 15 additions & 0 deletions auth.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// auth.test.ts
import { describe, test, expect } from "vitest";
import { getAPIKey } from "./src/api/auth"; // المسار النسبي من مكان الملف

describe("getAPIKey function", () => {
test("should return a string", () => {
const key = getAPIKey();
expect(typeof key).toBe("string");
});

test("should return the correct API key", () => {
const key = getAPIKey();
expect(key).toBe("my-secret-api-key");
});
});
Loading