Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
64736d2
README.md edit
aaptedata Mar 31, 2026
ce1772a
Adding ci.yml
aaptedata Apr 1, 2026
454b4cc
Changing ci.yml to run correctly
aaptedata Apr 1, 2026
8586274
Broken code Test
aaptedata Apr 3, 2026
d0c69dc
Fixed code Test
aaptedata Apr 3, 2026
3cb63b0
npm run test -- --coverage
aaptedata Apr 3, 2026
5a940e7
Adding Dynamic Badge
aaptedata Apr 3, 2026
f59b5d9
Adding Dynamic Badge and change to ci.yml
aaptedata Apr 3, 2026
43d7ac8
Formatting CI Job
aaptedata Apr 3, 2026
7eae10e
Formatting CI Job
aaptedata Apr 3, 2026
c02de7e
Merge pull request #2 from aaptedata/addtests
aaptedata Apr 3, 2026
e22a4c9
Unused function expect FAIL
aaptedata Apr 3, 2026
1408b69
Unused function removed, PASS.
aaptedata Apr 3, 2026
52420ad
Merge pull request #3 from aaptedata/addtests
aaptedata Apr 3, 2026
f4cb313
CI Security Check
aaptedata Apr 3, 2026
17727d3
Fix warning
aaptedata Apr 3, 2026
03b4ea9
Fix warning
aaptedata Apr 3, 2026
22605eb
Fix warning
aaptedata Apr 3, 2026
0653c06
Fix warning
aaptedata Apr 3, 2026
c69b503
Fix warning
aaptedata Apr 3, 2026
9914a6f
Fix warning
aaptedata Apr 3, 2026
325ac0f
Merge pull request #4 from aaptedata/addtests
aaptedata Apr 3, 2026
b24ec74
CD workflow
aaptedata Apr 3, 2026
f7aeb97
Merge branch 'main' of https://github.com/aaptedata/learn-cicd-typesc…
aaptedata Apr 3, 2026
0f28b55
Automate Build
aaptedata Apr 3, 2026
01fc563
Cloud Run Updates
aaptedata Apr 4, 2026
56fd1ca
DB Migration Workflow
aaptedata Apr 5, 2026
ba781b8
DB Migration Workflow with Token Secret
aaptedata Apr 5, 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

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Build
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 us-central1-docker.pkg.dev/sixth-foundry-492219-g4/notely-ar-repo/notely:latest ."

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

- name: Deploy to Cloud Run
run: gcloud run deploy notely --image us-central1-docker.pkg.dev/sixth-foundry-492219-g4/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project sixth-foundry-492219-g4 --max-instances=4
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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: Run style check
run: npm run format:check

- name: Check lint
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,5 +1,7 @@
# learn-cicd-typescript-starter (Notely)

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

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

## Local Development
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!

A Apte's version of Boot.dev's Notely app.
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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,
{ ignores: ["dist/", "coverage/"] },
pluginSecurity.configs.recommended,
]);

// import js from "@eslint/js";
// import globals from "globals";
// import tseslint from "typescript-eslint";
// import { defineConfig } from "eslint/config";

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