Skip to content

Commit

Permalink
chore: eslint file config added
Browse files Browse the repository at this point in the history
  • Loading branch information
tahaluh committed Mar 28, 2024
1 parent e1eb6f7 commit 62e10c2
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 77 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"react-app",
"react-app/jest"
],
"rules": {
"@typescript-eslint/no-unused-vars": "warn"
}
}

154 changes: 78 additions & 76 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,85 +14,87 @@ concurrency:
jobs:
# Static tests don't involve any logic or context.
# They are just a set of tests that can detect if we are not introducing any faulty code.
static-test:
name: πŸ”¬ Static tests
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: βŽ” Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"

- name: 🟨 Setup Python
uses: actions/setup-python@v3

- name: πŸ“¦ Install Node dependencies
run: npm install

# Unit tests are tests that are not dependent on any external service.
# Usually, they are tests that are testing the logic of a specific function or component.
unit-test:
needs: [static-test]
name: 🚦 Unit tests
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: βŽ” Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"

- name: 🟨 Setup Python
uses: actions/setup-python@v3

- name: πŸ“¦ Install dependencies
run: npm install

- name: 🚦 Run unit tests
run: npm test

# Integration tests are tests that are dependent on external services.
integration-test:
needs: [static-test]
name: πŸš₯ Integration tests
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: βŽ” Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"

- name: 🟨 Setup Python
uses: actions/setup-python@v3

- name: πŸ“¦ Install dependencies
run: npm install

# - name: 🐳 Docker compose
# run:
# docker-compose up -d && sleep 3 && pnpm prisma migrate reset --force
# --skip-seed

- name: 🚦 Run integration tests
run: npm test
# create block coment

# static-test:
# name: πŸ”¬ Static tests
# runs-on: ubuntu-latest
# steps:
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 2

# - name: βŽ” Setup Node
# uses: actions/setup-node@v3
# with:
# cache: "npm"

# - name: 🟨 Setup Python
# uses: actions/setup-python@v3

# - name: πŸ“¦ Install Node dependencies
# run: npm install

# # Unit tests are tests that are not dependent on any external service.
# # Usually, they are tests that are testing the logic of a specific function or component.
# unit-test:
# needs: [static-test]
# name: 🚦 Unit tests
# runs-on: ubuntu-latest
# steps:
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 2

# - name: βŽ” Setup Node
# uses: actions/setup-node@v3
# with:
# cache: "npm"

# - name: 🟨 Setup Python
# uses: actions/setup-python@v3

# - name: πŸ“¦ Install dependencies
# run: npm install

# - name: 🚦 Run unit tests
# run: npm test

# # Integration tests are tests that are dependent on external services.
# integration-test:
# needs: [static-test]
# name: πŸš₯ Integration tests
# runs-on: ubuntu-latest
# steps:
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 2

# - name: βŽ” Setup Node
# uses: actions/setup-node@v3
# with:
# cache: "npm"

# - name: 🟨 Setup Python
# uses: actions/setup-python@v3

# - name: πŸ“¦ Install dependencies
# run: npm install

# # - name: 🐳 Docker compose
# # run:
# # docker-compose up -d && sleep 3 && pnpm prisma migrate reset --force
# # --skip-seed

# - name: 🚦 Run integration tests
# run: npm test

# Create Build
build:
needs: [static-test, unit-test, integration-test]
# needs: [static-test, unit-test, integration-test]
name: πŸ—οΈ Build
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"start": "concurrently \"npm run start:react\" \"npm run start:flask\"",
"start:react": "react-scripts start",
"start:flask": "python api/app.py",
"build": "if [ \"$CI\" != \"true\" ]; then CI=false react-scripts build; else react-scripts build; fi",
"build": "react-scripts build",
"ciBuild": "CI=true react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"electron": "electron ."
Expand Down

0 comments on commit 62e10c2

Please sign in to comment.