From 2d6811e68942e0af24886a802e4af32ee973765c Mon Sep 17 00:00:00 2001 From: Vladimir Reznichenko Date: Fri, 26 Jul 2024 11:21:58 +0200 Subject: [PATCH] CI: speedup 'Check Asset Sizes' job (take 2) (#49992) --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/pr-assess-bundle-size.yml | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e689d6fbfe..4fdc501032f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -207,7 +207,7 @@ jobs: 'project-lint-jobs', 'project-test-jobs', ] - if: ${{ always() && github.event_name == 'pull_request' }} + if: ${{ !cancelled() && github.event_name == 'pull_request' }} steps: - uses: 'actions/checkout@v4' name: 'Checkout' @@ -330,8 +330,12 @@ jobs: report-flaky-tests: name: 'Create issues for flaky tests' - if: ${{ !cancelled() && ! github.event.pull_request.head.repo.fork }} - needs: [ 'project-test-jobs' ] + if: ${{ !cancelled() && ! github.event.pull_request.head.repo.fork && needs.project-jobs.outputs.test-jobs != '[]' }} + needs: + [ + 'project-jobs', + 'project-test-jobs', + ] runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/pr-assess-bundle-size.yml b/.github/workflows/pr-assess-bundle-size.yml index 06a64cdf8c0..f552f6198ac 100644 --- a/.github/workflows/pr-assess-bundle-size.yml +++ b/.github/workflows/pr-assess-bundle-size.yml @@ -47,9 +47,13 @@ jobs: pull-package-deps: '@woocommerce/plugin-woocommerce' - uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c + env: + BROWSERSLIST_IGNORE_OLD_DATA: true with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks}/{build,build-style}/**/*.{js,css}' + install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --config.dedupe-peer-dependents=false' + build-script: '--filter="@woocommerce/plugin-woocommerce" build' clean-script: '--if-present buildclean' minimum-change-threshold: 100 omit-unchanged: true