Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9bd1e0e
Refactor code structure for improved readability and maintainability
shirshak197 Dec 3, 2025
81b38e3
Add CI workflow for pull request testing
shirshak197 Dec 3, 2025
3c7225a
Update CI workflow to check Node.js version instead of forcing failure
shirshak197 Dec 3, 2025
5dd19cf
Add unit tests for person object in auth.test.ts
shirshak197 Dec 3, 2025
fac0b96
Update person object to set isActive to true in auth tests
shirshak197 Dec 3, 2025
bb0d321
Refactor code structure for improved readability and maintainability
shirshak197 Dec 3, 2025
28a0804
Add coverage support for Vitest in CI configuration and package.json
shirshak197 Dec 3, 2025
5c5cb5d
Update Node.js version to 20 in CI workflow
shirshak197 Dec 3, 2025
065fcd4
Add test status badge to README
shirshak197 Dec 3, 2025
875608d
Add Prettier for code formatting and update package.json scripts
shirshak197 Dec 3, 2025
3853e7e
Add code style check step to CI workflow
shirshak197 Dec 3, 2025
6633fc1
Refactor CI workflow to include code checkout, Node setup, and depend…
shirshak197 Dec 3, 2025
1a72a71
Rename job from "Code Style" to "Style" in CI workflow
shirshak197 Dec 3, 2025
94daa11
chore: update package.json to add eslint and typescript-eslint, and u…
shirshak197 Dec 3, 2025
2d25bbb
chore: add eslint-plugin-security and update related types in package…
shirshak197 Dec 3, 2025
58ffe65
fix: update linting step to enforce no warnings in CI workflow
shirshak197 Dec 3, 2025
3eb7a1b
fix: use crypto.randomBytes instead of crypto.pseudoRandomBytes for g…
shirshak197 Dec 3, 2025
e87c3c5
feat: add continuous deployment workflow for main branch
shirshak197 Dec 3, 2025
04d308f
chore: remove placeholder comment for deployment commands in CI workflow
shirshak197 Dec 3, 2025
2ae5364
feat: add Google Cloud authentication and Docker image build steps to…
shirshak197 Dec 6, 2025
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
39 changes: 39 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: cd

on:
push:
branches: [main]

jobs:
deploy:
name: Deploy
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: Build project
run: npm run build

- id: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v3"

- name: "Use gcloud CLI"
run: "gcloud info"

- name: "Build Docker Image"
run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-480113/notely-ar-repo/shirshak189/notely:latest .
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

- 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: 20

- name: Install dependencies
run: npm ci

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

- name: Check linting
run: npm run lint -- --max-warnings=0
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![test status](https://github.com/shirshak90/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)

# 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).
Expand All @@ -22,3 +24,6 @@ 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!
`

Shirshak's version of Boot.dev's Notely app.
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import pluginSecurity from "eslint-plugin-security";

export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: { globals: globals.node },
},
tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Loading