Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6ed9eb3
Add personal note to README
JanaDroubi Feb 23, 2026
ca9e7af
Add basic failing CI workflow (course assignment)
JanaDroubi Mar 12, 2026
002345d
Update CI to check Node version instead of forcing failure
JanaDroubi Mar 12, 2026
8e5517c
Fix auth tests to match actual ApiKey prefix logic
JanaDroubi Mar 12, 2026
350671c
Update CI: install deps + run real Vitest tests
JanaDroubi Mar 12, 2026
b16d508
Update package-lock.json for CI
JanaDroubi Mar 12, 2026
7ebe872
Temp: break tests to verify CI failure detection
JanaDroubi Mar 12, 2026
83f8a11
CI: try Node 20 instead of 22
JanaDroubi Mar 12, 2026
0f7e1d1
CI: try Node 20 instead of 22
JanaDroubi Mar 12, 2026
283bbab
CI: switch to Node 20 to fix setup-node failure
JanaDroubi Mar 12, 2026
2faeabb
Regenerate package-lock.json for CI
JanaDroubi Mar 12, 2026
6a0e93d
Fix: restore passing test after intentional CI failure demo
JanaDroubi Mar 12, 2026
c840e7f
Add Vitest V8 coverage reporting to CI
JanaDroubi Mar 12, 2026
8686b34
Merge pull request #1 from JanaDroubi/addtests
JanaDroubi Mar 12, 2026
a4186d6
Update README.md
JanaDroubi Mar 12, 2026
7bce0a9
Update README.md
JanaDroubi Mar 12, 2026
4264918
Trigger CI run on main for badge
JanaDroubi Mar 12, 2026
a7fbc7a
Update README to include only CI badge
JanaDroubi Mar 12, 2026
a93c98e
Update README for clarity and formatting
JanaDroubi Mar 12, 2026
b8f97b2
Update README.md
JanaDroubi Mar 12, 2026
ba6d1da
CI: add parallel Style job with format:check
JanaDroubi Mar 12, 2026
a254f73
Temp change to create new PR for formatting CI assignment
JanaDroubi Mar 12, 2026
232a2e8
Temporary change to trigger new PR for Formatting CI assignment
JanaDroubi Mar 12, 2026
a5633e3
Add temp section to force new PR banner
JanaDroubi Mar 12, 2026
c5ceb59
Merge branch 'main' into addtests
JanaDroubi Mar 12, 2026
0a0bc76
Add missing Prettier scripts format:check and format:write
JanaDroubi Mar 12, 2026
ab4ccce
Auto-format files to pass Style job
JanaDroubi Mar 12, 2026
a925706
Add Prettier to lockfile for CI
JanaDroubi Mar 12, 2026
ef8e4c9
Add lint step to Style job + unused function to demo failure
JanaDroubi Mar 12, 2026
4ae245d
Remove unused function to make lint pass in CI
JanaDroubi Mar 12, 2026
2c13193
Auto-format src/main.ts to pass Style job in CI
JanaDroubi Mar 12, 2026
6bb487d
Add missing 'lint' script to package.json for CI
JanaDroubi Mar 12, 2026
2a7ed63
Fix lint errors to make Style job pass
JanaDroubi Mar 12, 2026
397353e
Fix eslint.config.js syntax error and disable no-explicit-any in tests
JanaDroubi Mar 12, 2026
0823430
Update package-lock.json with ESLint dependencies for CI
JanaDroubi Mar 12, 2026
2f9370e
Auto-format src/main.ts to pass Style job in CI
JanaDroubi Mar 12, 2026
7f4876c
Add eslint-plugin-security + recommended config for security checks
JanaDroubi Mar 12, 2026
751c14f
CI: make lint fail on any warnings with --max-warnings=0
JanaDroubi Mar 12, 2026
04e2efc
Fix
JanaDroubi Mar 12, 2026
3d5cb1a
Auto-format src/api/users.ts to pass Style job in CI
JanaDroubi Mar 12, 2026
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
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 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: 20 # or 22 if it worked before

- name: Install dependencies
run: npm ci

- name: Run tests with coverage
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: 20

- name: Install dependencies
run: npm ci

- name: Check formatting
run: npm run format:check

- name: Check linting # ← new step
run: npm run lint -- --max-warnings=0 # ← this line updated
75 changes: 68 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,85 @@

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

# learn-cicd-typescript-starter (Notely)

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).
This repository contains the TypeScript starter code for the **Notely** application — part of the *Learn CI/CD* course on [Boot.dev](https://boot.dev).

**Jana's version of Boot.dev's Notely app.**

---

## Local Development

Make sure you're on Node version 22+.
> Make sure you're using **Node.js 22+**.

Create a `.env` file in the root of the project with the following contents:
### 1. Environment Setup

Create a `.env` file in the project root with:

```bash
PORT="8080"
```
````

Run the server:
### 2. Install Dependencies

```bash
npm install
```

### 3. Run the Server

```bash
npm run dev
```

_This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`.
* This starts the server in **non-database mode**.
* The app will be available at: [http://localhost:8080](http://localhost:8080)

> No database setup or interactivity is needed yet — instructions will come later in the course.

### 4. Run Tests (with Coverage)

```bash
npm run test
# or with coverage report:
npm run test -- --coverage
```

---

## Useful Scripts

| Script | Description |
| --------------- | -------------------------------- |
| `npm run dev` | Start the development server |
| `npm run test` | Run all tests with Vitest |
| `npm run build` | Compile TypeScript to JavaScript |
| `npm start` | Run the compiled app |

---

## CI / Continuous Integration

This repository uses **GitHub Actions** for CI. Every pull request to `main` will automatically:

* Install dependencies (`npm ci`)
* Run all unit tests (`vitest`)
* Generate a code coverage report

Check the [Actions tab](https://github.com/JanaDroubi/learn-cicd-typescript-starter/actions) for workflow runs and logs.

---

## Project Goals

This project is meant to help you learn and practice:

* Git branching & pull requests
* GitHub Actions workflows
* Unit testing with Vitest
* Code coverage reporting
* Automating quality checks in CI

Happy coding! 🚀

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!
22 changes: 22 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginSecurity from "eslint-plugin-security";

export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
pluginSecurity.configs.recommended,
{
languageOptions: {
globals: globals.node,
},
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
},
{
files: ["src/tests/**/*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
}
);
Loading