From 73b2c49d7d44163fe47026f1af137c1d5b00a473 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 19 Mar 2024 11:56:15 +0000 Subject: [PATCH] ci: add github workflow for running tests against PRs and master --- .github/workflows/node.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/node.yml diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml new file mode 100644 index 0000000..2f5d4c4 --- /dev/null +++ b/.github/workflows/node.yml @@ -0,0 +1,32 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x] + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + persist-credentials: false + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm clean-install + - name: Test code + run: npm test