From ee1b7631bb8ed9d1162255013bf6d41946b0f0b6 Mon Sep 17 00:00:00 2001 From: Erik Golinelli Date: Fri, 29 Mar 2024 18:21:05 +0100 Subject: [PATCH] Added workflow to run build and tests automatically (#608) --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..acdc0799 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Node.js CI + +on: + - push + - pull_request + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [lts/*, latest] + os: [ubuntu-latest, macos-latest, windows-latest] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm install + + - run: npm run build --if-present + + - run: npm run test