Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
39 changes: 39 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: cd

on:
push:
branches: [main]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- 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: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build



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

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Test
run: npm run test -- --run --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: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check code format
run: npm run format:check

- name: Check format issues
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 @@
![test badge](https://github.com/DucDTran/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!

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