Procházet zdrojové kódy

Added Nodejs testing workflow

Configured two workflows, one used for the PRs and a second one called `Master` for the final merge commits. The `Master` workflow status badge is also used in the README file.
Dorin Paslaru před 6 roky
rodič
revize
4f472cf299
3 změnil soubory, kde provedl 56 přidání a 1 odebrání
  1. 29 0
      .github/workflows/nodeci-master.yml
  2. 26 0
      .github/workflows/nodeci-pr.yml
  3. 1 1
      README.md

+ 29 - 0
.github/workflows/nodeci-master.yml

@@ -0,0 +1,29 @@
+name: Master
+
+on:
+  push:
+    branches:
+    - master
+      
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [12.x]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Use Node.js ${{ matrix.node-version }}
+      uses: actions/setup-node@v1
+      with:
+        node-version: ${{ matrix.node-version }}
+    - name: npm install, build, and test
+      run: |
+        npm install
+        npm run build --if-present
+        npm test
+      env:
+        CI: true

+ 26 - 0
.github/workflows/nodeci-pr.yml

@@ -0,0 +1,26 @@
+name: PR_Testing
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [12.x]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Use Node.js ${{ matrix.node-version }}
+      uses: actions/setup-node@v1
+      with:
+        node-version: ${{ matrix.node-version }}
+    - name: npm install, build, and test
+      run: |
+        npm install
+        npm run build --if-present
+        npm test
+      env:
+        CI: true

+ 1 - 1
README.md

@@ -2,7 +2,7 @@
 
 Web  GUI for [coriolis](https://github.com/cloudbase/coriolis)
 
-[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
+![](https://github.com/cloudbase/coriolis-web/workflows/Master/badge.svg) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
    
 ### Install instructions
 - [node](https://nodejs.org/en/download/package-manager/) >=6.x and [yarn](https://yarnpkg.com/lang/en/docs/install/) are required