From e964e93cc456538b053676dfaaf205b8e07dcf33 Mon Sep 17 00:00:00 2001 From: Pranay Kothapalli Date: Sun, 7 Sep 2025 13:55:59 +0530 Subject: [PATCH] chore: add node/react matrix tests --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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 000000000..9b8e472d6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: ['18', '20'] + react-version: ['18', '19'] + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Use React ${{ matrix.react-version }} + run: | + npm install react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }} --no-save + npm dedupe + + - name: Run tests + run: npm test