diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..bf959759 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "extends": [ + "react-app", + "react-app/jest" + ], + "rules": { + "@typescript-eslint/no-unused-vars": "warn" + } + } + \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5567105..6d5f5424 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: diff --git a/package.json b/package.json index f6884c84..e2456008 100644 --- a/package.json +++ b/package.json @@ -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 ."