]> zoso.dev Git - buffer.git/commitdiff
Add node verisons 16, 18 and 20 (#331)
authorDaniel Cousens <413395+dcousens@users.noreply.github.com>
Sun, 8 Oct 2023 02:27:44 +0000 (13:27 +1100)
committerGitHub <noreply@github.com>
Sun, 8 Oct 2023 02:27:44 +0000 (13:27 +1100)
.github/workflows/ci.yml

index 910c8cfd4a84e83bca84547f6bca7400acb299aa..817f3a7061e4c33b192c0692d4d475f55d6c047e 100644 (file)
@@ -1,23 +1,36 @@
-name: ci
-'on':
-  - push
-  - pull_request
+name: Tests
+
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+
 jobs:
-  test:
-    name: Node ${{ matrix.node }} / ${{ matrix.os }}
-    runs-on: ${{ matrix.os }}
+  unit:
+    runs-on: ubuntu-latest
     strategy:
       fail-fast: false
       matrix:
-        os:
-          - ubuntu-latest
-        node:
-          - '14'
+        # see https://nodejs.org/en/about/releases/
+        node-version: [16.x, 18.x, 20.x]
+
     steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-node@v2
-        with:
-          node-version: ${{ runner.node }}
-      - run: npm install
-      - run: npm run build --if-present
-      - run: npm test
+    - uses: actions/checkout@main
+    - uses: actions/setup-node@main
+      with:
+        node-version: ${{ matrix.node-version }}
+    - run: npm install
+    - run: npm test
+
+  standard:
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@main
+    - uses: actions/setup-node@main
+      with:
+        # don't use lts/* to prevent hitting rate-limit
+        node-version: 20.x
+    - run: npm install
+    - run: npm run standard