Create pr.yml
authorAlessandro Pio Ardizio <alessandroardizio94@gmail.com>
Sun, 7 Feb 2021 09:59:18 +0000 (10:59 +0100)
committerGitHub <noreply@github.com>
Sun, 7 Feb 2021 09:59:18 +0000 (10:59 +0100)
.github/workflows/pr.yml [new file with mode: 0644]

diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644 (file)
index 0000000..a055b0b
--- /dev/null
@@ -0,0 +1,25 @@
+name: NodeCI
+
+on: [pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [12.x, 14.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 ci
+          npm run build --if-present
+          npm run test
+        env:
+          CI: true