chore(deps): update build-tooling #2764
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Check for changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| packages: ${{ steps.filter.outputs.packages }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| filters: | | |
| packages: | |
| - 'packages/**' | |
| - 'targets/**' | |
| - 'tests/**' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'vitest.config.ts' | |
| - '.github/publish-ci/**/package-lock.json' | |
| - '.github/workflows/*.yml' | |
| - '.github/actions/**' | |
| - 'package.json' | |
| build: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.packages == 'true' }} | |
| name: 'Build' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| turbo-cache: 'true' | |
| - name: Build | |
| run: pnpm build-ci --filter=!@react-spring/docs | |
| - name: Pack | |
| run: pnpm package | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: animated | |
| path: packages/animated/package.tgz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: core | |
| path: packages/core/package.tgz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: rafz | |
| path: packages/rafz/package.tgz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: shared | |
| path: packages/shared/package.tgz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: types | |
| path: packages/types/package.tgz | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: web | |
| path: targets/web/package.tgz | |
| test-unit: | |
| name: 'Test:unit' | |
| needs: [changes] | |
| if: ${{ needs.changes.outputs.packages == 'true' }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ['22.x', '24.x'] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-chromium-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install Playwright Chromium | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Test | |
| run: pnpm test:unit | |
| test-types: | |
| name: 'Test:types with TS ${{ matrix.ts }}' | |
| needs: [changes] | |
| if: ${{ needs.changes.outputs.packages == 'true' }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ts: ['5.0', '5.4', '5.7', '5.9', '6.0'] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Install TypeScript ${{ matrix.ts }} | |
| run: pnpm add -w typescript@${{ matrix.ts }} | |
| - name: Build | |
| run: pnpm build-ci | |
| - name: Check repo types | |
| run: | | |
| pnpm tsc --version | |
| pnpm check:types | |
| - name: Test types | |
| run: pnpm test:types | |
| test-e2e: | |
| needs: [changes] | |
| if: ${{ needs.changes.outputs.packages == 'true' }} | |
| name: 'Test:E2E' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-chromium-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install Playwright Chromium | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Test | |
| run: pnpm test:e2e | |
| test-published-artifact: | |
| needs: [build] | |
| if: ${{ needs.changes.outputs.packages == 'true' }} | |
| name: 'Test:publish' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| example: ['next', 'vite', 'node-standard', 'node-esm'] | |
| defaults: | |
| run: | |
| working-directory: ./.github/publish-ci/${{ matrix.example }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: .github/publish-ci/${{ matrix.example }}/package-lock.json | |
| - name: Install | |
| run: npm ci | |
| - name: Remove existing @react-spring/web | |
| run: npm uninstall @react-spring/web | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: ./.github/publish-ci/${{ matrix.example }} | |
| - name: Check folder contents | |
| run: ls -l . | |
| - name: Install RS build artifacts | |
| run: npm install ./web/package.tgz ./animated/package.tgz ./core/package.tgz ./rafz/package.tgz ./shared/package.tgz ./types/package.tgz | |
| - name: Show installed RS versions | |
| run: npm info @react-spring/web && npm ls @react-spring/web | |
| - name: Build example | |
| run: npm run build | |
| - name: Run test step | |
| run: npm test | |
| are-the-types-wrong: | |
| name: Check package config with are-the-types-wrong | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: web | |
| - name: show folder | |
| run: ls -l . | |
| - name: Run are-the-types-wrong | |
| # The library is ESM-only; the `esm-only` profile accepts a CJS require() | |
| # resolving to ESM (works via Node's require(ESM) since 22.12/20.19). | |
| run: npx @arethetypeswrong/cli@0.18.3 ./package.tgz --format table --profile esm-only |