guhongwei 4 år sedan
förälder
incheckning
9f83a0d865
2 ändrade filer med 15 tillägg och 6 borttagningar
  1. 14 5
      .github/workflows/nodejs.yml
  2. 1 1
      app/router.js

+ 14 - 5
.github/workflows/nodejs.yml

@@ -22,12 +22,21 @@ jobs:
         os: [ubuntu-latest, windows-latest, macos-latest]
         os: [ubuntu-latest, windows-latest, macos-latest]
 
 
     steps:
     steps:
-    - uses: actions/checkout@v2
+    - name: Checkout Git Source
+      uses: actions/checkout@v2
+
     - name: Use Node.js ${{ matrix.node-version }}
     - name: Use Node.js ${{ matrix.node-version }}
       uses: actions/setup-node@v1
       uses: actions/setup-node@v1
       with:
       with:
         node-version: ${{ matrix.node-version }}
         node-version: ${{ matrix.node-version }}
-    - run: npm i -g npminstall && npminstall
-    - run: npm run ci
-      env:
-        CI: true
+
+    - name: Install Dependencies
+      run: npm i -g npminstall && npminstall
+
+    - name: Continuous Integration
+      run: npm run ci
+
+    - name: Code Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        token: ${{ secrets.CODECOV_TOKEN }}

+ 1 - 1
app/router.js

@@ -5,7 +5,7 @@
  */
  */
 module.exports = app => {
 module.exports = app => {
   const { router, controller } = app;
   const { router, controller } = app;
-  router.get('/', controller.home.index);
+  // router.get('/', controller.home.index);
   // 企业信息表设置
   // 企业信息表设置
   router.resources('company', '/api/servicetest/company', controller.company); // index、create、show、destroy
   router.resources('company', '/api/servicetest/company', controller.company); // index、create、show、destroy
   router.post('company', '/api/servicetest/company/update/:id', controller.company.update);
   router.post('company', '/api/servicetest/company/update/:id', controller.company.update);