Skip to content

Commit

Permalink
sanity (#4)
Browse files Browse the repository at this point in the history
* sanity

* keep around generated files for build

* wip

* add test coverage

* env

* pathing

* path
  • Loading branch information
ashmortar authored Aug 7, 2024
1 parent 18bd463 commit e4309f7
Show file tree
Hide file tree
Showing 18 changed files with 901 additions and 22 deletions.
7 changes: 6 additions & 1 deletion .env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ DB_URL="file:./test.db"
NODE_ENV="test"
SESSION_SECRET="test"
PORT=9999
DEBUG_ROUTES=0
DEBUG_ROUTES=0
GOOGLE_OAUTH_CLIENT_ID="your client id"
GOOGLE_OAUTH_CLIENT_SECRET="your secret"
GOOGLE_OAUTH_CALLBACK_URL="http://localhost:300/auth/google/callback"
GOOGLE_OAUTH_SCOPE="profile,email"
JWT_SECRET="your secret key"
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: NestJS Core CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Setup Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: env
run: cp ./.env.test.example ./.env.test
- name: Test
run: npm run test:cov

build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Use Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Generated files
/generated

# OS
.DS_Store
Expand Down
87 changes: 87 additions & 0 deletions generated/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/* DO NOT EDIT, file generated by nestjs-i18n */

/* eslint-disable */
/* prettier-ignore */
import { Path } from "nestjs-i18n";
/* prettier-ignore */
export type I18nTranslations = {
"about": {
"title": string;
"description": string;
};
"auth": {
"sign_in": {
"title": string;
"email": string;
"password": string;
"sign_in": string;
"forgot_password": string;
"no_account": string;
"google": string;
"submit": string;
};
"register": {
"title": string;
"email": string;
"password": string;
"confirm_password": string;
"register": string;
"already_have_account": string;
"google": string;
"submit": string;
};
"forgot_password": {
"title": string;
"email": string;
"forgot_pass": string;
"remember_password": string;
"no_account": string;
"submit": string;
};
};
"contact": {
"title": string;
"description": string;
};
"meta": {
"title": string;
"description": string;
};
"privacy": {
"title": string;
"description": string;
};
"root": {
"links": {
"home": string;
"about": string;
"contact": string;
"privacy": string;
"tou": string;
"sign_in": string;
"register": string;
"profile": string;
};
"app_name": string;
"welcome": string;
"description": string;
};
"tou": {
"title": string;
"description": string;
};
"main": {
"links": {
"home": string;
"about": string;
"contact": string;
"privacy": string;
"tou": string;
};
"app_name": string;
"welcome": string;
"description": string;
};
};
/* prettier-ignore */
export type I18nPath = Path<I18nTranslations>;
Loading

0 comments on commit e4309f7

Please sign in to comment.