Browse Source

feat: :construction_worker: seperate lint jobs for fe & be

ThatOneCalculator 1 year ago
parent
commit
0b1dd21a30

+ 1 - 4
.github/workflows/python.yaml → .github/workflows/format-backend.yaml

@@ -5,7 +5,7 @@ on:
   pull_request:
 jobs:
   build:
-    name: 'Format Backend' # Format & Lint
+    name: 'Format Backend'
     env:
       PUBLIC_API_BASE_URL: ''
     runs-on: ubuntu-latest
@@ -23,8 +23,5 @@ jobs:
         run: |
           python -m pip install --upgrade pip
           pip install yapf
-         # pip install pylint
-    # - name: Lint backend
-    #   run: bun run lint:backend
       - name: Format backend
         run: bun run format:backend

+ 1 - 3
.github/workflows/bun.yaml → .github/workflows/format-build-frontend.yaml

@@ -5,7 +5,7 @@ on:
   pull_request:
 jobs:
   build:
-    name: 'Format & Build Frontend' # Format, Lint, & Build
+    name: 'Format & Build Frontend'
     env:
       PUBLIC_API_BASE_URL: ''
     runs-on: ubuntu-latest
@@ -16,8 +16,6 @@ jobs:
       - run: bun --version
       - name: Install frontend dependencies
         run: bun install --frozen-lockfile
-      # - run: bun run lint
-      # - run: bun run lint:types
       - name: Format frontend
         run: bun run format
       - name: Build frontend

+ 27 - 0
.github/workflows/lint-backend.yaml

@@ -0,0 +1,27 @@
+name: Python CI
+on:
+  push:
+    branches: ['main']
+  pull_request:
+jobs:
+  build:
+    name: 'Lint Backend'
+    env:
+      PUBLIC_API_BASE_URL: ''
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        node-version:
+          - latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Use Python
+        uses: actions/setup-python@v4
+      - name: Use Bun
+        uses: oven-sh/setup-bun@v1
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install pylint
+      - name: Lint backend
+        run: bun run lint:backend

+ 20 - 0
.github/workflows/lint-frontend.yaml

@@ -0,0 +1,20 @@
+name: Bun CI
+on:
+  push:
+    branches: ['main']
+  pull_request:
+jobs:
+  build:
+    name: 'Lint Frontend'
+    env:
+      PUBLIC_API_BASE_URL: ''
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Use Bun
+        uses: oven-sh/setup-bun@v1
+      - run: bun --version
+      - name: Install frontend dependencies
+        run: bun install --frozen-lockfile
+      - run: bun run lint
+      - run: bun run lint:types