From 275a72e1ca9be451f385156c2caae6c1f861db37 Mon Sep 17 00:00:00 2001 From: Charles Graham Date: Thu, 4 Jun 2026 17:25:20 -0500 Subject: [PATCH] Add React 18/19 build checks on PR --- .github/workflows/react-compatibility.yml | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/react-compatibility.yml diff --git a/.github/workflows/react-compatibility.yml b/.github/workflows/react-compatibility.yml new file mode 100644 index 00000000..9c723620 --- /dev/null +++ b/.github/workflows/react-compatibility.yml @@ -0,0 +1,39 @@ +name: React Compatibility + +on: + pull_request: + branches: [main] + +jobs: + build: + name: Build with React ${{ matrix.react }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + react: ["18", "19"] + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Install React ${{ matrix.react }} + run: npm install --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }} @types/react@${{ matrix.react }} @types/react-dom@${{ matrix.react }} + + - name: Run tests + run: npm test + + - name: Build library + run: npm run build-lib + + - name: Build docs + run: npm run build-docs