Browse Source

Add a GitHub action for tests

Andrew Lane 4 năm trước cách đây
mục cha
commit
05548d2871
2 tập tin đã thay đổi với 26 bổ sung10 xóa
  1. 0 10
      .github/workflows/lint.yml
  2. 26 0
      .github/workflows/node.yml

+ 0 - 10
.github/workflows/lint.yml

@@ -1,10 +0,0 @@
-name: Lint
-on: [push, pull_request]
-jobs:
-    lint:
-        runs-on: ubuntu-latest
-        steps:
-            - uses: actions/checkout@v2
-            - uses: Adzz/yarn_command_action@v1.0.0
-              with:
-                  command: lint

+ 26 - 0
.github/workflows/node.yml

@@ -0,0 +1,26 @@
+name: Node CI
+
+on: [push, pull_request]
+
+jobs:
+    test:
+        runs-on: ubuntu-latest
+        strategy:
+            matrix:
+                node-version: [12.x, 14.x]
+        steps:
+            - uses: actions/checkout@v2
+            - uses: actions/setup-node@v1
+              with:
+                  node-version: ${{ matrix.node-version }}
+            - run: npm install --ignore-scripts
+            - run: npm test
+    lint:
+        runs-on: ubuntu-latest
+        steps:
+            - uses: actions/checkout@v2
+            - uses: actions/setup-node@v1
+              with:
+                  node-version: 12.x
+            - run: npm install --ignore-scripts
+            - run: npm run lint