浏览代码

Seperate backend & frontend CI

ThatOneCalculator 1 年之前
父节点
当前提交
6ce41c712c
共有 2 个文件被更改,包括 36 次插入5 次删除
  1. 6 5
      .github/workflows/bun.yaml
  2. 30 0
      .github/workflows/python.yaml

+ 6 - 5
.github/workflows/bun.yaml

@@ -18,10 +18,11 @@ jobs:
       - name: Use Bun
         uses: oven-sh/setup-bun@v1
       - run: bun --version
-      - run: bun install --frozen-lockfile
+      - name: Install frontend dependencies
+        run: bun install --frozen-lockfile
       # - run: bun run lint
-      # - run: bun run lint:backend
       # - run: bun run lint:types
-      - run: bun run format
-      - run: bun run format:backend
-      - run: bun run build
+      - name: Format frontend
+        run: bun run format
+      - name: Build frontend
+        run: bun run build

+ 30 - 0
.github/workflows/python.yaml

@@ -0,0 +1,30 @@
+name: Python CI
+on:
+  push:
+    branches: ['main']
+  pull_request:
+jobs:
+  build:
+    name: 'Format & Build' # Format, Lint, & Build
+    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 yapf
+          pip install pylint
+      - name: Lint backend
+        run: bun run lint:backend
+      - name: Format backend
+        run: bun run format:backend