Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into log-history-page
  • Loading branch information
naheyansheikh committed Nov 16, 2024
2 parents 4917bbf + c4c704a commit 068b847
Show file tree
Hide file tree
Showing 22 changed files with 13,760 additions and 4,042 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This workflow will run on all pull requests to 'main'

name: on-pull-request

on:
pull_request:
branches:
- 'main'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# Frontend Build
- name: Install frontend dependencies
run: |
cd frontend
npm ci
- name: Lint frontend
run: |
cd frontend
npm run lint
- name: Build frontend
run: |
cd frontend
npm run build --if-present
- name: Run frontend tests
run: |
cd frontend
npm test
# Backend Build
- name: Install backend dependencies
run: |
cd backend
npm ci
- name: Lint backend
run: |
cd backend
npm run lint
- name: Build backend
run: |
cd backend
npm run build --if-present
- name: Run backend tests
run: |
cd backend
npm test
67 changes: 67 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This workflow will run on pushes to all branches

name: on-push

on:
push:
branches:
- '*'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# Frontend Build
- name: Install frontend dependencies
run: |
cd frontend
npm ci
- name: Lint frontend
run: |
cd frontend
npm run lint
- name: Build frontend
run: |
cd frontend
npm run build --if-present
- name: Run frontend tests
run: |
cd frontend
npm test
# Backend Build
- name: Install backend dependencies
run: |
cd backend
npm ci
- name: Lint backend
run: |
cd backend
npm run lint
- name: Build backend
run: |
cd backend
npm run build --if-present
- name: Run backend tests
run: |
cd backend
npm test
34 changes: 34 additions & 0 deletions backend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import js from '@eslint/js'
import jest from 'eslint-plugin-jest'
import globals from 'globals'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,ts}'],
languageOptions: {
ecmaVersion: 'latest',
globals: globals.node,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
...js.configs.recommended.rules,
},
},
{
files: ['**/__tests__/**/*.test.{js,ts}'],
plugins: {
jest,
},
languageOptions: {
globals: jest.environments.globals.globals
},
rules: {
...jest.configs.recommended.rules,
}
}
]
Loading

0 comments on commit 068b847

Please sign in to comment.