Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kuv2707 committed May 26, 2024
2 parents f7f1a2b + 3cdf31f commit 83432de
Show file tree
Hide file tree
Showing 11 changed files with 5,357 additions and 325 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ESLint

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
eslint-backend:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install backend dependencies
working-directory: ./backend
run: npm install

- name: Run backend lint
working-directory: ./backend
run: npm run lint

eslint-frontend:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install frontend dependencies
working-directory: ./frontend
run: npm install

- name: Run frontend lint
working-directory: ./frontend
run: npm run lint
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI/CD Pipeline

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

services:
mongo:
image: mongo:latest
ports:
- 27017:27017

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install backend dependencies
working-directory: ./backend
run: npm install

# - name: Run backend tests
# working-directory: ./backend
# run: npm test

- name: Install frontend dependencies
working-directory: ./frontend
run: npm install

# - name: Run frontend tests
# working-directory: ./frontend
# run: npm test

- name: Build frontend
working-directory: ./frontend
run: npm run build
52 changes: 52 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Prettier

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
prettier-backend:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install backend dependencies
working-directory: ./backend
run: npm install

- name: Run backend format check
working-directory: ./backend
run: npm run format

prettier-frontend:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install frontend dependencies
working-directory: ./frontend
run: npm install

- name: Run frontend format check
working-directory: ./frontend
run: npm run format
24 changes: 24 additions & 0 deletions backend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
// Add your custom rules here
}
}
6 changes: 6 additions & 0 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 4,
"semi": true
}
Loading

0 comments on commit 83432de

Please sign in to comment.