Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
05871db
README.md
KevinRapo Jun 11, 2026
e6f34b7
Merge pull request #1 from KevinRapo/addtests
KevinRapo Jun 11, 2026
e9ce89f
Course task
KevinRapo Jun 11, 2026
60b5db9
ci.yml file
KevinRapo Jun 11, 2026
c26e9b5
node ci
KevinRapo Jun 11, 2026
6b6e3f6
Tests on CI L2
KevinRapo Jun 11, 2026
43d5007
Fix
KevinRapo Jun 11, 2026
9b16b9f
Merge pull request #4 from KevinRapo/addtests
KevinRapo Jun 11, 2026
96cc1c0
fix 2
KevinRapo Jun 11, 2026
ecccc00
package.json
KevinRapo Jun 11, 2026
82b551a
everything
KevinRapo Jun 11, 2026
e9eb96d
add test coverage to CI
KevinRapo Jun 11, 2026
d11e6d7
coverage fix
KevinRapo Jun 11, 2026
82203ef
readme badge
KevinRapo Jun 11, 2026
5d2cb85
readme badge fix
KevinRapo Jun 11, 2026
4e8f451
Merge pull request #5 from KevinRapo/addtests
KevinRapo Jun 11, 2026
bd7f9b8
Parallel CI style
KevinRapo Jun 12, 2026
a102a7c
Parallel CI style
KevinRapo Jun 12, 2026
9decf6a
Parallel CI style
KevinRapo Jun 12, 2026
0dd5e37
Parallel CI style
KevinRapo Jun 12, 2026
5eb0a29
Security warnings
KevinRapo Jun 12, 2026
c38ad7c
Security warnings
KevinRapo Jun 12, 2026
05f30b8
Testing CD workflow
KevinRapo Jun 12, 2026
72a0009
Merge pull request #6 from KevinRapo/addtests
KevinRapo Jun 12, 2026
c0ab74b
Deploy test
KevinRapo Jun 12, 2026
65186f1
Merge pull request #7 from KevinRapo/addtests
KevinRapo Jun 12, 2026
c458915
heading and deploy test
KevinRapo Jun 12, 2026
cfed83d
Merge pull request #8 from KevinRapo/addtests
KevinRapo Jun 12, 2026
684a7f9
heading and deploy test 2
KevinRapo Jun 12, 2026
a048453
Merge pull request #9 from KevinRapo/addtests
KevinRapo Jun 12, 2026
6dc5176
Migration in cd.yml
KevinRapo Jun 12, 2026
22f5e0c
Merge pull request #10 from KevinRapo/addtests
KevinRapo Jun 12, 2026
cea23e9
Migration in cd.yml
KevinRapo Jun 12, 2026
7cac3ac
Merge pull request #11 from KevinRapo/addtests
KevinRapo Jun 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
50 changes: 50 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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: 22

- name: Install dependencies
run: npm ci

- name: Build the app
run: npm run build

- name: Migrations
run: npm run db:migrate

- 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 and push to GAF
run: gcloud builds submit --tag us-central1-docker.pkg.dev/unified-ring-499216-c9/notely-ar-repo/notely:latest .

- name: Deploy to Cloud Run
run: gcloud run deploy notely --image us-central1-docker.pkg.dev/unified-ring-499216-c9/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project unified-ring-499216-c9 --max-instances=4


48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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: 22

- name: Install dependencies
run: npm ci

- name: Run coverage test
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: Style
run: npm run format:check

- name: Linting
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 @@
![example workflow](https://github.com/KevinRapo/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,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!

KevinRapo's version of Boot.dev's Notely app!
Empty file added chmod-test.tmp
Empty file.
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Loading