From 04532ab935b16581ede2041e7383733c77ae2182 Mon Sep 17 00:00:00 2001 From: andre-brandao <82166576+andre-brandao@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:25:49 -0300 Subject: [PATCH] test workflow --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ffcfe0a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,30 @@ +name: Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + 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' + - name: Install Dependencies + run: npm ci + - name: Build + run: npm run build --if-present + - name: Test + run: npm test