dragooncjw 10 месяцев назад
Родитель
Сommit
514c6506cb
2 измененных файлов с 33 добавлено и 4 удалено
  1. 2 4
      .github/workflows/ci.yml
  2. 31 0
      .github/workflows/pr-ci.yml

+ 2 - 4
.github/workflows/ci.yml

@@ -2,8 +2,6 @@ name: CI
 on:
   push:
     branches: [ "main" ]
-  pull_request:
-    branches: [ "main" ]
 jobs:
   build:
     runs-on: ubuntu-latest
@@ -13,8 +11,8 @@ jobs:
           fetch-depth: 1
       - name: Config Git User
         run: |
-          git config --local user.name "chenjiawei.inizio"
-          git config --local user.email "chenjiawei.inizio@bytedance.com"
+          git config --local user.name "dragooncjw"
+          git config --local user.email "289056872@qq.com"
       - name: For Debug
         run: |
           echo "Listing files in the root directory:"

+ 31 - 0
.github/workflows/pr-ci.yml

@@ -0,0 +1,31 @@
+name: Fork PR-CI
+on:
+  pull_request_target:
+    branches: 
+      -*
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 1
+      - name: Config Git User
+        run: |
+          git config --local user.name "dragooncjw"
+          git config --local user.email "289056872@qq.com"
+      - name: For Debug
+        run: |
+          echo "Listing files in the root directory:"
+          ls -alh
+      - uses: actions/setup-node@v3
+        with:
+          node-version: 18
+      - name: Verify Change Logs
+        run: node common/scripts/install-run-rush.js change --verify
+      - name: Rush Install
+        run: node common/scripts/install-run-rush.js install
+      - name: Rush build
+        run: node common/scripts/install-run-rush.js build
+      - name: Test (coverage)
+        run: node common/scripts/install-run-rush.js test:cov