Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b391631
Add my Notely line to README
Yssengrim Nov 4, 2025
9f90afe
Workflows Commit
Yssengrim Nov 5, 2025
8090533
Merge pull request #1 from Yssengrim/addtests
Yssengrim Nov 5, 2025
7177493
Workflow Node Version
Yssengrim Nov 5, 2025
bd77348
CI Tests Commit
Yssengrim Nov 5, 2025
c2c7a70
CI Test Commit Type 2
Yssengrim Nov 5, 2025
755c3d5
CI Test
Yssengrim Nov 5, 2025
8f46944
CI Test Fixed
Yssengrim Nov 5, 2025
bf38b8b
CI Tests Fixed 2
Yssengrim Nov 5, 2025
e1eede0
CI test fix 3
Yssengrim Nov 5, 2025
f81b1f2
CI TEST FIX 4
Yssengrim Nov 5, 2025
7e78b4e
CI TEST FIX
Yssengrim Nov 5, 2025
1483c05
CI TEST BROKEN
Yssengrim Nov 5, 2025
5675bca
CI TEST BREAK
Yssengrim Nov 5, 2025
2ba976f
Test Broken
Yssengrim Nov 5, 2025
1e009cf
Broken Test
Yssengrim Nov 5, 2025
4299d13
Broken Test 2
Yssengrim Nov 5, 2025
1d87a84
CODE COVERAGE
Yssengrim Nov 5, 2025
0391bd9
Code Coverage Commit
Yssengrim Nov 6, 2025
9070b11
Badge Commit
Yssengrim Nov 6, 2025
7631746
Merge pull request #2 from Yssengrim/addtests
Yssengrim Nov 6, 2025
c6dfb34
Formatting CI Commit
Yssengrim Nov 7, 2025
37bc992
Formatting CI Commit - Corrected Style Check
Yssengrim Nov 7, 2025
cc4da08
UNUSED STILL IN
Yssengrim Nov 7, 2025
09519c5
UNUSED REMOVED
Yssengrim Nov 7, 2025
e801d91
UNUSED OUT 2
Yssengrim Nov 7, 2025
462c16b
chore: format files
Yssengrim Nov 7, 2025
f06d3b2
ESLINT COMMIT
Yssengrim Nov 8, 2025
98dc7da
SECURITY COMMIT 2
Yssengrim Nov 8, 2025
3f56d02
CD WORK FLOW ADD
Yssengrim Nov 8, 2025
dc5f6ee
Merge pull request #3 from Yssengrim/addtests
Yssengrim Nov 8, 2025
665f192
Automate Builds
Yssengrim Nov 9, 2025
1e7594e
Merge pull request #4 from Yssengrim/addtests
Yssengrim Nov 9, 2025
4fe3de5
Welcome to Notely Added
Yssengrim Nov 11, 2025
7559edd
Merge pull request #5 from Yssengrim/addtests
Yssengrim Nov 11, 2025
51a3d8c
Migrate Automatically
Yssengrim Nov 11, 2025
fd85156
Merge pull request #6 from Yssengrim/addtests
Yssengrim Nov 11, 2025
6dc1663
Migrate Automatically Fix 1
Yssengrim Nov 11, 2025
d2e30f0
Merge pull request #7 from Yssengrim/addtests
Yssengrim Nov 11, 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
53 changes: 53 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: cd

on:
push:
branches: [main]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
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: "20"

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}


- name: Set up gcloud CLI
uses: google-github-actions/setup-gcloud@v2
with:
project_id: notely-477717

- name: Verify gcloud context
run: |
gcloud config set project notely-477717
gcloud auth list
gcloud services list --enabled | grep -E 'artifactregistry|cloudbuild' || true

- name: Build and push image to Artifact Registry
run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-477717/notely-ar-repo/notely:latest .

- name: Run Migration
run: npm run db:migrate

- name: Deploy to Cloud Run
run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-477717/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-477717 --max-instances=4
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci

on:
push:
branches: [main]
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 code style
run: npm run format:check
- name: Lint code
run: npm run lint
- 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,6 @@
```md
![tests](https://github.com/Yssengrim/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 +25,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!

Yssengrim'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