Skip to content

feat(infra): migrate to lerna 8 #10909

feat(infra): migrate to lerna 8

feat(infra): migrate to lerna 8 #10909

Workflow file for this run

name: Build All Examples
on:
pull_request:
paths:
- "packages/**"
- "examples/**"
types:
- labeled
- synchronize
- opened
- reopened
- ready_for_review
push:
branches:
- master
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
inputs:
environment:
description: "Environment to run tests against"
type: environment
required: false
jobs:
chunks:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-build-examples
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Create Example Chunks
if: "${{ !github.event.pull_request.draft }}"
outputs:
CHUNK_1: ${{ steps.chunkstep.outputs.CHUNK_1 }}
CHUNK_1_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_1_INSTALL_SCRIPT }}
CHUNK_2: ${{ steps.chunkstep.outputs.CHUNK_2 }}
CHUNK_2_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_2_INSTALL_SCRIPT }}
CHUNK_3: ${{ steps.chunkstep.outputs.CHUNK_3 }}
CHUNK_3_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_3_INSTALL_SCRIPT }}
CHUNK_4: ${{ steps.chunkstep.outputs.CHUNK_4 }}
CHUNK_4_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_4_INSTALL_SCRIPT }}
CHUNK_5: ${{ steps.chunkstep.outputs.CHUNK_5 }}
CHUNK_5_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_5_INSTALL_SCRIPT }}
CHUNK_6: ${{ steps.chunkstep.outputs.CHUNK_6 }}
CHUNK_6_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_6_INSTALL_SCRIPT }}
CHUNK_7: ${{ steps.chunkstep.outputs.CHUNK_7 }}
CHUNK_7_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_7_INSTALL_SCRIPT }}
CHUNK_8: ${{ steps.chunkstep.outputs.CHUNK_8 }}
CHUNK_8_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_8_INSTALL_SCRIPT }}
CHUNK_9: ${{ steps.chunkstep.outputs.CHUNK_9 }}
CHUNK_9_INSTALL_SCRIPT: ${{ steps.chunkstep.outputs.CHUNK_9_INSTALL_SCRIPT }}
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- name: Fetch commits
run: git fetch origin ${{ github.base_ref || 'master' }} --depth=1
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: |
corepack enable
corepack install
yarn --immutable
- name: Split Into Chunks
id: chunkstep
run: CHUNKS=9 BASE_REF=${{ github.base_ref }} BUILD_ALL_EXAMPLES=${{ (contains(steps.pr-labels.outputs.labels, ' build-examples ') || github.event_name == 'schedule' ) && 'true' || 'false' }} node ./.github/workflows/build-example-chunks.js
build-chunk-1:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_1 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-1
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 1)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_1_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_1 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_1 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-1-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-2:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_2 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-2
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 2)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_2_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_2 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: REFINE_NO_TELEMETRY=true BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_2 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-2-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-3:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_3 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-3
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 3)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_3_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_3 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_3 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-3-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-4:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_4 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-4
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 4)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_4_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_4 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_4 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-4-${{ github.run_attempt }}-4 node ./.github/workflows/e2e-examples.js
build-chunk-5:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_5 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-5
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 5)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_5_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_5 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_5 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-5-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-6:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_6 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-6
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 6)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_6_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_6 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_6 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-6-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-7:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_7 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-7
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 7)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_7_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_7 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_7 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-7-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-8:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_8 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-8
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 8)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_8_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_8 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_8 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-8-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js
build-chunk-9:
runs-on: ubuntu-latest
if: "${{ needs.chunks.outputs.CHUNK_9 != '' }}"
concurrency:
group: ${{ github.ref }}-build-examples-chunk-9
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
name: Build All Examples (Chunk 9)
needs: chunks
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.6
- uses: actions/checkout@v4
- run: |
corepack enable
corepack install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Dependencies
run: ${{ needs.chunks.outputs.CHUNK_9_INSTALL_SCRIPT }}
- name: Build
run: REFINE_NO_TELEMETRY=true yarn build -- --no-bail --scope=${{ needs.chunks.outputs.CHUNK_9 }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Run E2E Tests
run: BASE_REF=${{ github.base_ref }} EXAMPLES=${{ needs.chunks.outputs.CHUNK_9 }} CYPRESS_PROJECT_ID=${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }} CI_BUILD_ID=refine-${{ github.ref_name }}-${{ steps.slug.outputs.sha7 }}-chunk-9-${{ github.run_attempt }} node ./.github/workflows/e2e-examples.js