Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4e35472
readme task
Hitchhiker007 Apr 13, 2026
5f1016f
redo task
Hitchhiker007 Apr 13, 2026
4402517
yml testing
Hitchhiker007 Apr 13, 2026
06ce4a1
pass tests
Hitchhiker007 Apr 13, 2026
3075a82
push broken test code to see if Github catches it
Hitchhiker007 Apr 13, 2026
6d6b01a
Successfully broke the testing, now to upload real tests covering all…
Hitchhiker007 Apr 13, 2026
41895e4
should past tests
Hitchhiker007 Apr 13, 2026
be7c15e
package json regenaration
Hitchhiker007 Apr 13, 2026
9ffcb5f
Update package-lock.json with vitest dependency
Hitchhiker007 Apr 13, 2026
751192a
added coverage report package
Hitchhiker007 Apr 13, 2026
23bba82
package json update
Hitchhiker007 Apr 13, 2026
e439f70
hopefully the tests work
Hitchhiker007 Apr 13, 2026
8b333e2
regenerate lock file
Hitchhiker007 Apr 13, 2026
32e6610
Added Readme badge
Hitchhiker007 Apr 13, 2026
50a5425
added prettier and format checking job to workflow
Hitchhiker007 Apr 14, 2026
2d21d68
workflow
Hitchhiker007 Apr 14, 2026
e0b1277
regenerated files
Hitchhiker007 Apr 14, 2026
2527009
lets purposely trigger the linting error
Hitchhiker007 Apr 14, 2026
3fe3adf
worklfow added linting
Hitchhiker007 Apr 14, 2026
21d94ee
linting added to pakage
Hitchhiker007 Apr 14, 2026
fb82539
regenerate files
Hitchhiker007 Apr 14, 2026
0cf264b
removed linting breaking code, linting confirmed to work
Hitchhiker007 Apr 14, 2026
cfb2101
prettier fix to pass test
Hitchhiker007 Apr 14, 2026
33f6717
security check fail
Hitchhiker007 Apr 15, 2026
7f0eee2
fix linting security warning
Hitchhiker007 Apr 15, 2026
a18f55b
cd workflow
Hitchhiker007 Apr 15, 2026
b2c46bf
change node version in workflows
Hitchhiker007 Apr 15, 2026
b5b5f2c
regenerate package-lock.json fresh
Hitchhiker007 Apr 15, 2026
f209b67
add gcloud auth and docker build to cd workflow
Hitchhiker007 Apr 15, 2026
4a30644
New glcoud deploy command added to CD file
Hitchhiker007 Apr 16, 2026
5f339c5
new DB migrations added to cd workflow
Hitchhiker007 Apr 16, 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
46 changes: 46 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: cd

on:
push:
branches: [main]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

# This part
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

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

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

- name: Install dependencies
run: npm ci

- name: Build app
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: "Build and push Docker image"
run: "gcloud builds submit --tag australia-southeast2-docker.pkg.dev/notely-493404/notely-ar-repo/notely:latest ."

- name: "Run migrations"
run: "npm run db:migrate"

- name: "Deploy notely to G Cloud run"
run: "gcloud run deploy notely --image australia-southeast2-docker.pkg.dev/notely-493404/notely-ar-repo/notely:latest --region australia-southeast2 --allow-unauthenticated --project notely-493404 --max-instances=4"
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: 25

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

- name: Install dependencies
run: npm ci

- name: Run format check
run: npm run format:check

- name: Run linting check
run: npm run lint -- --max-warnings=0
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![CI Status](https://github.com/Hitchhiker007/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)](https://github.com/Hitchhiker007/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).
Expand All @@ -22,3 +24,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!

William's version of Boot.dev's Notely app.
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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([
{ ignores: ["dist/**"] },
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: { globals: globals.node },
},
tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Loading