Skip to content

Commit

Permalink
Merge branch 'main' into chore/release
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Mar 20, 2024
2 parents df1cb35 + 6325ea8 commit e98d1e4
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches:
- "!main"
- "!develop"
- "*"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run Prettier (Pre-commit or in workflow)
run: pnpm lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run ESLint
run: pnpm lint
- name: Run unit tests
run: pnpm run test:unit
- name: Run e2e tests
run: pnpm run test:e2e
23 changes: 23 additions & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Lint PR"

on:
pull_request:
types:
- opened
- edited
- synchronize
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
lint-pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Lint PR
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions backend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
pnpm run lint
pnpm run format
4 changes: 3 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"db:deploy-migrations": " pnpx prisma migrate deploy --schema=src/prisma/schema.prisma",
"db:validate": "pnpm dlx prisma validate --schema=src/prisma/schema.prisma",
"db:format": "pnpm dlx prisma format --schema=src/prisma/schema.prisma",
"db:reset": "pnpm dlx prisma migrate reset --force --schema=src/prisma/schema.prisma"
"db:reset": "pnpm dlx prisma migrate reset --force --schema=src/prisma/schema.prisma",
"prepare": "husky"
},
"dependencies": {
"@arendajaelu/nestjs-passport-apple": "^2.0.2",
Expand Down Expand Up @@ -71,6 +72,7 @@
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^9.0.11",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
Expand Down
9 changes: 9 additions & 0 deletions backend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e98d1e4

Please sign in to comment.