瀏覽代碼

chore: Add codegen to build and test pipelines

David Höck 9 月之前
父節點
當前提交
6fd3e11d63

+ 2 - 0
.github/workflows/build_and_test_branches.yml

@@ -14,6 +14,8 @@ env:
     CI: true
 
 jobs:
+    codegen:
+        uses: ./.github/workflows/codegen.yml
     build:
         name: build
         runs-on: ubuntu-latest

+ 2 - 0
.github/workflows/build_and_test_master.yml

@@ -11,6 +11,8 @@ concurrency:
     cancel-in-progress: true
 
 jobs:
+    codegen:
+        uses: ./.github/workflows/codegen.yml
     build:
         name: build
         runs-on: ubuntu-latest

+ 2 - 0
.github/workflows/build_and_test_pr.yml

@@ -13,6 +13,8 @@ concurrency:
     cancel-in-progress: true
 
 jobs:
+    codegen:
+        uses: ./.github/workflows/codegen.yml
     build:
         name: build
         runs-on: ubuntu-latest

+ 20 - 0
.github/workflows/codegen.yml

@@ -0,0 +1,20 @@
+name: Codegen
+
+env:
+    CI: true
+
+jobs:
+    codegen:
+        runs-on: ubuntu-latest
+        steps:
+            - uses: actions/checkout@v4
+            - name: Use Node.js 22
+              uses: actions/setup-node@v4
+              with:
+                  node-version: 22
+            - name: Install dependencies
+              run: npm install
+            - name: Build core and common packages
+              run: npm run build:core-common
+            - name: Generate GraphQL types
+              run: npm run codegen