diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f75ca94ffaeb..aa349de10023 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -20,6 +20,15 @@ runs: using: composite steps: - uses: pnpm/action-setup@v4.0.0 + + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-node-${{ inputs.node-version }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-node-${{ inputs.node-version }}-turbo- + - name: Use Node.js ${{ inputs.node-version }} uses: actions/setup-node@v4 with: @@ -29,7 +38,7 @@ runs: # The NPM_TOKEN secret needs to be defined in the job registry-url: 'https://registry.npmjs.org' - - run: pnpm install + - run: pnpm install --prefer-offline shell: bash - run: pnpm -r run dev diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000000..48983945becc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ['18', '20', '22', '24'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install & build + uses: ./.github/actions/setup + with: + node-version: ${{ matrix.node-version }} + skip-tsc: false + skip-build: false diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index f014aa27bd2f..502c52629a29 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -1,22 +1,10 @@ name: Bundle size on: - pull_request: - paths-ignore: - # Any update here needs to be done for all files - # (test.yml, benchmark.yml, release-ci.yml, bundle-size.yml, ci-aux-files.yml) - - '*.md' - - '*.bench.ts' - - 'LICENSE' - - '.dockerignore' - - 'scripts/ci/publish.ts' - - '.github/CODEOWNERS' - - '.github/ISSUE_TEMPLATE/**' - - '.github/DISCUSSION_TEMPLATE/**' - - '.devcontainer/**' - - '.vscode/**' - - 'graphs/**' - - 'sandbox/**' + workflow_run: + workflows: [Build] + types: + - completed concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -25,6 +13,7 @@ concurrency: jobs: size: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v4 @@ -33,8 +22,8 @@ jobs: uses: ./.github/actions/setup with: node-version: 18 - skip-tsc: true - skip-build: true + skip-tsc: false + skip-build: false - uses: andresz1/size-limit-action@v1 with: