Skip to content
Open

init #330

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5f1069a
init
mitchelln11 Jan 16, 2026
ac02b03
add github directories and worflow yml
mitchelln11 Jan 16, 2026
a86eda2
switch run to node version
mitchelln11 Jan 16, 2026
28ebd49
add auth tests and run script with typo
mitchelln11 Jan 16, 2026
4bf9073
fix script typo
mitchelln11 Jan 16, 2026
777279b
Add run unit tests to ci yml page
mitchelln11 Jan 17, 2026
1748770
chore: add vitest coverage to deps and ci yml
mitchelln11 Jan 17, 2026
a3407f9
bump node version on cy yml to 20
mitchelln11 Jan 17, 2026
47d55af
feat: attempt to add a badge to GitHub
mitchelln11 Jan 17, 2026
06c8573
fix: update badge link to image markdown format
mitchelln11 Jan 17, 2026
91ac001
feat: add new Style job to yml file, add prettier, update test styling
mitchelln11 Jan 17, 2026
a5d4646
chore: add linter and ci fail check
mitchelln11 Jan 17, 2026
b107431
fix: remove unused function
mitchelln11 Jan 17, 2026
3ef0c16
fix: lint fix
mitchelln11 Jan 17, 2026
4527d57
feat: add linting to ci
mitchelln11 Jan 18, 2026
01c3f2e
fix: update crypto path
mitchelln11 Jan 18, 2026
f90d11b
feat: add cd yml file for deploys
mitchelln11 Jan 19, 2026
1ba1454
fix: switch npm cd command to npm ci, matches ci yml file
mitchelln11 Jan 19, 2026
d5ea7d0
fix: build spelling error
mitchelln11 Jan 19, 2026
684a619
Feat: Automate builds
mitchelln11 Jan 21, 2026
f534064
fix: minor update to kick off cd Actions on merge
mitchelln11 Jan 21, 2026
764d9eb
fix: update Docker build project name
mitchelln11 Jan 21, 2026
6f77145
fix: update docker build to notely ar name
mitchelln11 Jan 21, 2026
e4ade74
feat: add cloud deploy step to cd yml
mitchelln11 Jan 24, 2026
930e271
feat: add migration step to cd yml
mitchelln11 Jan 25, 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
48 changes: 48 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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

- 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-484820/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/notely-484820/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-484820 --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:
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 unit 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: Style
run: npm run format:check

- name: CI Linting
run: npm run lint

- name: Check linting
run: npm run lint -- --max-warnings=0
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![My first Badge](https://github.com/mitchelln11/bootdev-cicd-typescript/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 +23,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!

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