Support Babel 8 dependency overrides #12082
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - renovate/** | |
| pull_request: | |
| permissions: {} | |
| env: | |
| NODE_VERSION: 24 | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| babel: ["7", "8"] | |
| node: ["22.13.0", "24", "25", "26"] | |
| os: ["ubuntu"] | |
| exclude: | |
| # Babel 8 requires Node.js 22.18.0 or newer on the 22.x line. | |
| - babel: "8" | |
| node: "22.13.0" | |
| include: | |
| - os: ubuntu | |
| node: "22.18.0" | |
| babel: "8" | |
| - os: macos | |
| node: "24" | |
| babel: "7" | |
| - os: macos | |
| node: "24" | |
| babel: "8" | |
| - os: windows | |
| node: "24" | |
| babel: "7" | |
| - os: windows | |
| node: "24" | |
| babel: "8" | |
| name: Tests (Babel ${{ matrix.babel }}, Node.js v${{ matrix.node }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Compile against the declared Babel 7 types before testing each runtime. | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Install Babel 8 runtime | |
| if: "${{ matrix.babel == '8' }}" | |
| run: pnpm --filter react-docgen add --save-exact @babel/core@8.0.1 @babel/traverse@8.0.4 @babel/types@8.0.4 | |
| - name: Unit tests with coverage | |
| if: "${{ matrix.node == env.NODE_VERSION }}" | |
| run: pnpm --filter react-docgen --filter @react-docgen/cli --parallel --no-bail test --coverage | |
| - name: Unit tests | |
| if: "${{ matrix.node != env.NODE_VERSION }}" | |
| run: pnpm --filter react-docgen --filter @react-docgen/cli --parallel --no-bail test | |
| - name: Upload coverage | |
| if: "${{ matrix.node == env.NODE_VERSION }}" | |
| continue-on-error: true | |
| uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2 | |
| with: | |
| parallel: true | |
| flag-name: test-babel-${{ matrix.babel }}-${{ matrix.os }} | |
| finish: | |
| needs: tests | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Close parallel build | |
| uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2 | |
| with: | |
| parallel-finished: true | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm lint | |
| website: | |
| name: Website test build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm exec nx run @react-docgen-internal/website:build |