From 24a64e5c58693cc9a000c5884a6778e843c94bf5 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Thu, 18 Sep 2025 10:58:30 +0200 Subject: [PATCH 1/5] Refactor Github Actions --- .github/workflows/all-test.yml | 120 ++ .github/workflows/dart.yml | 1276 ----------------- app/test/shared/versions_test.dart | 4 +- .../lib/src/fake_test_context_provider.dart | 12 +- pkg/pub_integration/lib/src/test_browser.dart | 17 +- .../test/search_update_test.dart | 10 +- .../tool/trigger_puppeteer_download.dart | 9 + 7 files changed, 165 insertions(+), 1283 deletions(-) create mode 100644 .github/workflows/all-test.yml delete mode 100644 .github/workflows/dart.yml create mode 100644 pkg/pub_integration/tool/trigger_puppeteer_download.dart diff --git a/.github/workflows/all-test.yml b/.github/workflows/all-test.yml new file mode 100644 index 0000000000..79aaeb188e --- /dev/null +++ b/.github/workflows/all-test.yml @@ -0,0 +1,120 @@ +name: All tests +permissions: read-all +on: + push: + branches: + - main + - master + pull_request: + schedule: + - cron: "0 0 * * 0" # runs on every Sunday + +env: + PUB_ENVIRONMENT: bot.github + DART_SDK_VERSION: '3.9.0' + +jobs: + app_build_only: + name: app/ (build only) + runs-on: ubuntu-latest + steps: + - name: Cache PUB_CACHE + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + with: + path: ~/.pub-cache + key: ${{runner.os}}-pub-cache + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{env.DART_SDK_VERSION}} + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - run: dart pub get + - name: Install webp + run: sudo apt-get update -yq && sudo apt-get install webp + - run: dart analyze --fatal-infos . + working-directory: app/ + - run: dart format --output=none --set-exit-if-changed . + working-directory: app/ + - run: dart test -P build-only -j 1 + working-directory: app/ + + app_test: + name: app/ (shard ${{matrix.shard}}) + strategy: + fail-fast: false + matrix: + shard: [0, 1, 2, 3, 4, 5, 6, 7] + runs-on: ubuntu-latest + steps: + - name: Cache PUB_CACHE + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + with: + path: ~/.pub-cache + key: ${{runner.os}}-pub-cache + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{env.DART_SDK_VERSION}} + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - run: dart pub get + - name: Install webp + run: sudo apt-get update -yq && sudo apt-get install webp + - run: dart test -P presubmit --shard-index ${{matrix.shard}} --total-shards 8 + working-directory: app/ + + test_packages: + strategy: + fail-fast: false + matrix: + package: + - api_builder + - code_coverage + - fake_gcloud + - indexed_blob + - pub_integration + - pub_package_reader + - _pub_shared + - pub_worker + - puppeteer_screenshots + - web_app + - web_css + name: pkg/${{matrix.package}}/ + runs-on: ubuntu-latest + steps: + - name: Cache PUB_CACHE + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + with: + path: ~/.pub-cache + key: ${{runner.os}}-pub-cache + - name: Setup Dart SDK + uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c + with: + sdk: ${{env.DART_SDK_VERSION}} + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - run: dart pub get + - run: dart analyze --fatal-infos . + working-directory: pkg/${{matrix.package}} + - run: dart format --output=none --set-exit-if-changed . + working-directory: pkg/${{matrix.package}} + - name: Check for test directory + id: check_test_dir + run: | + if [ -d "pkg/${{matrix.package}}/test" ]; then + echo "Test directory found for ${{matrix.package}}." + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "No test directory found for ${{matrix.package}}. Skipping tests." + echo "exists=false" >> $GITHUB_OUTPUT + fi + shell: bash + - name: Run tests + if: steps.check_test_dir.outputs.exists == 'true' + run: | + if [[ "${{ matrix.package }}" == "pub_integration" ]]; then + dart tool/trigger_puppeteer_download.dart + fi + dart test --run-skipped + working-directory: pkg/${{matrix.package}} diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml deleted file mode 100644 index 20b7c6211a..0000000000 --- a/.github/workflows/dart.yml +++ /dev/null @@ -1,1276 +0,0 @@ -# Created with package:mono_repo v6.6.3 -name: Dart CI -on: - push: - branches: - - main - - master - pull_request: - schedule: - - cron: "0 0 * * 0" -defaults: - run: - shell: bash -env: - PUB_ENVIRONMENT: bot.github -permissions: read-all - -jobs: - job_001: - name: mono_repo self validate - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: stable - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.3 - - name: mono_repo self validate - run: dart pub global run mono_repo generate --validate - job_002: - name: "smoke_test; PKGS: app, pkg/_pub_shared, pkg/api_builder, pkg/fake_gcloud, pkg/pub_package_reader, pkg/web_app, pkg/web_css; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app-pkg/_pub_shared-pkg/api_builder-pkg/fake_gcloud-pkg/pub_package_reader-pkg/web_app-pkg/web_css;commands:format-analyze_0" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app-pkg/_pub_shared-pkg/api_builder-pkg/fake_gcloud-pkg/pub_package_reader-pkg/web_app-pkg/web_css - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - id: pkg__pub_shared_pub_get - name: pkg/_pub_shared; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/_pub_shared - - name: "pkg/_pub_shared; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg__pub_shared_pub_get.conclusion == 'success'" - working-directory: pkg/_pub_shared - - name: "pkg/_pub_shared; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg__pub_shared_pub_get.conclusion == 'success'" - working-directory: pkg/_pub_shared - - id: pkg_api_builder_pub_get - name: pkg/api_builder; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/api_builder - - name: "pkg/api_builder; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_api_builder_pub_get.conclusion == 'success'" - working-directory: pkg/api_builder - - name: "pkg/api_builder; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_api_builder_pub_get.conclusion == 'success'" - working-directory: pkg/api_builder - - id: pkg_fake_gcloud_pub_get - name: pkg/fake_gcloud; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/fake_gcloud - - name: "pkg/fake_gcloud; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_fake_gcloud_pub_get.conclusion == 'success'" - working-directory: pkg/fake_gcloud - - name: "pkg/fake_gcloud; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_fake_gcloud_pub_get.conclusion == 'success'" - working-directory: pkg/fake_gcloud - - id: pkg_pub_package_reader_pub_get - name: pkg/pub_package_reader; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_package_reader - - name: "pkg/pub_package_reader; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_pub_package_reader_pub_get.conclusion == 'success'" - working-directory: pkg/pub_package_reader - - name: "pkg/pub_package_reader; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_pub_package_reader_pub_get.conclusion == 'success'" - working-directory: pkg/pub_package_reader - - id: pkg_web_app_pub_get - name: pkg/web_app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_app - - name: "pkg/web_app; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_web_app_pub_get.conclusion == 'success'" - working-directory: pkg/web_app - - name: "pkg/web_app; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_web_app_pub_get.conclusion == 'success'" - working-directory: pkg/web_app - - id: pkg_web_css_pub_get - name: pkg/web_css; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_css - - name: "pkg/web_css; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_web_css_pub_get.conclusion == 'success'" - working-directory: pkg/web_css - - name: "pkg/web_css; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_web_css_pub_get.conclusion == 'success'" - working-directory: pkg/web_css - job_003: - name: "smoke_test; PKGS: pkg/indexed_blob, pkg/puppeteer_screenshots; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/indexed_blob-pkg/puppeteer_screenshots;commands:format-analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/indexed_blob-pkg/puppeteer_screenshots - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_indexed_blob_pub_get - name: pkg/indexed_blob; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/indexed_blob - - name: "pkg/indexed_blob; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_indexed_blob_pub_get.conclusion == 'success'" - working-directory: pkg/indexed_blob - - name: "pkg/indexed_blob; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_indexed_blob_pub_get.conclusion == 'success'" - working-directory: pkg/indexed_blob - - id: pkg_puppeteer_screenshots_pub_get - name: pkg/puppeteer_screenshots; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/puppeteer_screenshots - - name: "pkg/puppeteer_screenshots; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_puppeteer_screenshots_pub_get.conclusion == 'success'" - working-directory: pkg/puppeteer_screenshots - - name: "pkg/puppeteer_screenshots; dart analyze --fatal-infos ." - run: dart analyze --fatal-infos . - if: "always() && steps.pkg_puppeteer_screenshots_pub_get.conclusion == 'success'" - working-directory: pkg/puppeteer_screenshots - job_004: - name: "smoke_test; PKG: pkg/pub_integration; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos lib/`, `dart analyze --fatal-infos test/`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration;commands:format-analyze_2-analyze_3" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_integration_pub_get - name: pkg/pub_integration; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart analyze --fatal-infos lib/" - run: dart analyze --fatal-infos lib/ - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart analyze --fatal-infos test/" - run: dart analyze --fatal-infos test/ - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - job_005: - name: "smoke_test; PKG: pkg/pub_worker; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos --fatal-warnings bin/ lib/`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker;commands:format-analyze_4" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_worker_pub_get - name: pkg/pub_worker; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_worker - - name: "pkg/pub_worker; dart format --output=none --set-exit-if-changed ." - run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.pkg_pub_worker_pub_get.conclusion == 'success'" - working-directory: pkg/pub_worker - - name: "pkg/pub_worker; dart analyze --fatal-infos --fatal-warnings bin/ lib/" - run: dart analyze --fatal-infos --fatal-warnings bin/ lib/ - if: "always() && steps.pkg_pub_worker_pub_get.conclusion == 'success'" - working-directory: pkg/pub_worker - job_006: - name: "build; PKG: pkg/web_app; `./build.sh`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_app;commands:command_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_web_app_pub_get - name: pkg/web_app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_app - - name: pkg/web_app; ./build.sh - run: ./build.sh - if: "always() && steps.pkg_web_app_pub_get.conclusion == 'success'" - working-directory: pkg/web_app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_007: - name: "build; PKG: pkg/web_css; `./build.sh`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_css;commands:command_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_css - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_web_css_pub_get - name: pkg/web_css; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_css - - name: pkg/web_css; ./build.sh - run: ./build.sh - if: "always() && steps.pkg_web_css_pub_get.conclusion == 'success'" - working-directory: pkg/web_css - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - job_008: - name: "build_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P build-only -j 1`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_00" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P build-only -j 1" - run: dart test -P build-only -j 1 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - job_009: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 0`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_01" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 0" - run: dart test -P presubmit --total-shards 8 --shard-index 0 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_010: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 1`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_02" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 1" - run: dart test -P presubmit --total-shards 8 --shard-index 1 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_011: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 2`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_03" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 2" - run: dart test -P presubmit --total-shards 8 --shard-index 2 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_012: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 3`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_04" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 3" - run: dart test -P presubmit --total-shards 8 --shard-index 3 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_013: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 4`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_05" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 4" - run: dart test -P presubmit --total-shards 8 --shard-index 4 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_014: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 5`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_06" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 5" - run: dart test -P presubmit --total-shards 8 --shard-index 5 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_015: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 6`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_07" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 6" - run: dart test -P presubmit --total-shards 8 --shard-index 6 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_016: - name: "unit_test; PKG: app; `sudo apt-get update -yq && sudo apt-get install webp`, `dart test -P presubmit --total-shards 8 --shard-index 7`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app;commands:command_0-test_08" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: app_pub_get - name: app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: app - - name: "app; sudo apt-get update -yq && sudo apt-get install webp" - run: "sudo apt-get update -yq && sudo apt-get install webp" - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - - name: "app; dart test -P presubmit --total-shards 8 --shard-index 7" - run: dart test -P presubmit --total-shards 8 --shard-index 7 - if: "always() && steps.app_pub_get.conclusion == 'success'" - working-directory: app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_017: - name: "unit_test; PKG: pkg/_pub_shared; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/_pub_shared;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/_pub_shared - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg__pub_shared_pub_get - name: pkg/_pub_shared; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/_pub_shared - - name: "pkg/_pub_shared; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg__pub_shared_pub_get.conclusion == 'success'" - working-directory: pkg/_pub_shared - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_018: - name: "unit_test; PKG: pkg/fake_gcloud; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/fake_gcloud;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/fake_gcloud - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_fake_gcloud_pub_get - name: pkg/fake_gcloud; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/fake_gcloud - - name: "pkg/fake_gcloud; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_fake_gcloud_pub_get.conclusion == 'success'" - working-directory: pkg/fake_gcloud - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_019: - name: "unit_test; PKG: pkg/indexed_blob; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/indexed_blob;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/indexed_blob - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_indexed_blob_pub_get - name: pkg/indexed_blob; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/indexed_blob - - name: "pkg/indexed_blob; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_indexed_blob_pub_get.conclusion == 'success'" - working-directory: pkg/indexed_blob - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_020: - name: "unit_test; PKG: pkg/pub_package_reader; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_package_reader;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_package_reader - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_package_reader_pub_get - name: pkg/pub_package_reader; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_package_reader - - name: "pkg/pub_package_reader; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_pub_package_reader_pub_get.conclusion == 'success'" - working-directory: pkg/pub_package_reader - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_021: - name: "unit_test; PKG: pkg/puppeteer_screenshots; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/puppeteer_screenshots;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/puppeteer_screenshots - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_puppeteer_screenshots_pub_get - name: pkg/puppeteer_screenshots; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/puppeteer_screenshots - - name: "pkg/puppeteer_screenshots; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_puppeteer_screenshots_pub_get.conclusion == 'success'" - working-directory: pkg/puppeteer_screenshots - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_022: - name: "unit_test; PKG: pkg/web_app; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_app;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_app - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_web_app_pub_get - name: pkg/web_app; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_app - - name: "pkg/web_app; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_web_app_pub_get.conclusion == 'success'" - working-directory: pkg/web_app - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_023: - name: "unit_test; PKG: pkg/web_css; `dart test --run-skipped`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_css;commands:test_09" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/web_css - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_web_css_pub_get - name: pkg/web_css; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/web_css - - name: "pkg/web_css; dart test --run-skipped" - run: dart test --run-skipped - if: "always() && steps.pkg_web_css_pub_get.conclusion == 'success'" - working-directory: pkg/web_css - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_024: - name: "unit_test; PKG: pkg/pub_integration; `dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~4p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration;commands:test_10" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_integration_pub_get - name: pkg/pub_integration; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~4p'`" - run: "dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~4p'`" - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_025: - name: "unit_test; PKG: pkg/pub_integration; `dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~4p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration;commands:test_11" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_integration_pub_get - name: pkg/pub_integration; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~4p'`" - run: "dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~4p'`" - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_026: - name: "unit_test; PKG: pkg/pub_integration; `dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~4p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration;commands:test_12" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_integration_pub_get - name: pkg/pub_integration; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~4p'`" - run: "dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~4p'`" - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_027: - name: "unit_test; PKG: pkg/pub_integration; `dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '3~4p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration;commands:test_13" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_integration - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_integration_pub_get - name: pkg/pub_integration; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_integration - - name: "pkg/pub_integration; dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '3~4p'`" - run: "dart test -j1 --run-skipped `find test -name \"*_test\\\\.dart\" | sort | sed -n '3~4p'`" - if: "always() && steps.pkg_pub_integration_pub_get.conclusion == 'success'" - working-directory: pkg/pub_integration - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_028: - name: "unit_test; PKG: pkg/pub_worker; `dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~3p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker;commands:test_14" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_worker_pub_get - name: pkg/pub_worker; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_worker - - name: "pkg/pub_worker; dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~3p'`" - run: "dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '0~3p'`" - if: "always() && steps.pkg_pub_worker_pub_get.conclusion == 'success'" - working-directory: pkg/pub_worker - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_029: - name: "unit_test; PKG: pkg/pub_worker; `dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~3p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker;commands:test_15" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_worker_pub_get - name: pkg/pub_worker; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_worker - - name: "pkg/pub_worker; dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~3p'`" - run: "dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '1~3p'`" - if: "always() && steps.pkg_pub_worker_pub_get.conclusion == 'success'" - working-directory: pkg/pub_worker - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_030: - name: "unit_test; PKG: pkg/pub_worker; `dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~3p'``" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker;commands:test_16" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0;packages:pkg/pub_worker - os:ubuntu-latest;pub-cache-hosted;sdk:3.9.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c - with: - sdk: "3.9.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - id: pkg_pub_worker_pub_get - name: pkg/pub_worker; dart pub get - run: dart pub get - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkg/pub_worker - - name: "pkg/pub_worker; dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~3p'`" - run: "dart test --run-skipped --concurrency=1 `find test -name \"*_test\\\\.dart\" | sort | sed -n '2~3p'`" - if: "always() && steps.pkg_pub_worker_pub_get.conclusion == 'success'" - working-directory: pkg/pub_worker - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 diff --git a/app/test/shared/versions_test.dart b/app/test/shared/versions_test.dart index 64241cb03e..8e1b7067c4 100644 --- a/app/test/shared/versions_test.dart +++ b/app/test/shared/versions_test.dart @@ -82,8 +82,8 @@ void main() { expect(docker.contains('\nFROM dart:$runtimeSdkVersion\n'), isTrue); final String monoPkg = await File('mono_pkg.yaml').readAsString(); expect(monoPkg.contains('$runtimeSdkVersion'), isTrue); - final ci = await File('../.github/workflows/dart.yml').readAsString(); - expect(ci.contains('sdk:$runtimeSdkVersion'), isTrue); + final ci = await File('../.github/workflows/all-test.yml').readAsString(); + expect(ci.contains("DART_SDK_VERSION: '$runtimeSdkVersion'"), isTrue); }); test('Dart SDK versions should match Dockerfile.worker', () async { diff --git a/pkg/pub_integration/lib/src/fake_test_context_provider.dart b/pkg/pub_integration/lib/src/fake_test_context_provider.dart index 374f6b17bc..b3a8f49c63 100644 --- a/pkg/pub_integration/lib/src/fake_test_context_provider.dart +++ b/pkg/pub_integration/lib/src/fake_test_context_provider.dart @@ -17,7 +17,7 @@ import 'test_browser.dart'; import 'test_scenario.dart'; /// The timeout factor that should be used in integration tests. -final testTimeoutFactor = 6; +final testTimeoutFactor = 8; class TestContextProvider { final String pubHostedUrl; @@ -30,7 +30,9 @@ class TestContextProvider { this._testBrowser, ); - static Future start() async { + static Future start({ + List? ignoreServerErrors, + }) async { final fakePubServerProcess = await FakePubServerProcess.start(); await fakePubServerProcess.started; final origin = 'http://localhost:${fakePubServerProcess.port}'; @@ -42,7 +44,11 @@ class TestContextProvider { Isolate.current.hashCode, ].join('-'); - final testBrowser = TestBrowser(origin: origin, testName: testName); + final testBrowser = TestBrowser( + origin: origin, + testName: testName, + ignoreServerErrors: ignoreServerErrors, + ); await testBrowser.startBrowser(); return TestContextProvider._(origin, fakePubServerProcess, testBrowser); } diff --git a/pkg/pub_integration/lib/src/test_browser.dart b/pkg/pub_integration/lib/src/test_browser.dart index 643689a828..c3817f80ce 100644 --- a/pkg/pub_integration/lib/src/test_browser.dart +++ b/pkg/pub_integration/lib/src/test_browser.dart @@ -12,6 +12,9 @@ import 'package:puppeteer/puppeteer.dart'; import 'package:puppeteer_screenshots/puppeteer_utils.dart'; import 'package:retry/retry.dart'; +/// Filters server or client messages, ignoring and not reporting them as errors. +typedef IgnoreMessageFilter = bool Function(String message); + /// Creates and tracks the headless Chrome environment, its temp directories and /// and uncaught exceptions. class TestBrowser { @@ -31,14 +34,19 @@ class TestBrowser { /// The coverage report of CSS files. final _cssCoverages = {}; + /// Filters to ignore server errors. + final List? _ignoreServerErrors; + TestBrowser({ required String origin, String? testName, String? coverageDir, bool displayBrowser = false, + List? ignoreServerErrors, }) : _displayBrowser = displayBrowser, _testName = testName, _origin = origin, + _ignoreServerErrors = ignoreServerErrors, _coverageDir = coverageDir ?? Platform.environment['COVERAGE_DIR'], _tempDir = Directory.systemTemp.createTempSync('pub-headless'); @@ -297,8 +305,15 @@ class TestBrowserSession { if (clientErrors.isNotEmpty) { throw Exception('Client errors detected: ${clientErrors.first}'); } + if (_browser._ignoreServerErrors != null) { + serverErrors.removeWhere( + (msg) => _browser._ignoreServerErrors!.any((fn) => fn(msg)), + ); + } if (serverErrors.isNotEmpty) { - throw Exception('Server errors detected: ${serverErrors.first}'); + throw Exception( + '${serverErrors.length} server errors detected: ${serverErrors.first}', + ); } return r; } finally { diff --git a/pkg/pub_integration/test/search_update_test.dart b/pkg/pub_integration/test/search_update_test.dart index 45bf87e210..ed07620278 100644 --- a/pkg/pub_integration/test/search_update_test.dart +++ b/pkg/pub_integration/test/search_update_test.dart @@ -18,7 +18,15 @@ void main() { final httpClient = http.Client(); setUpAll(() async { - fakeTestScenario = await TestContextProvider.start(); + fakeTestScenario = await TestContextProvider.start( + ignoreServerErrors: [ + // NOTE: This message seems to be a race condition. + // Investigate if this can be safely ignored (e.g. it is retried). + (msg) => msg.contains( + 'returned bad HTML: No data found for resource with given identifier', + ), + ], + ); }); tearDownAll(() async { diff --git a/pkg/pub_integration/tool/trigger_puppeteer_download.dart b/pkg/pub_integration/tool/trigger_puppeteer_download.dart new file mode 100644 index 0000000000..067049c75a --- /dev/null +++ b/pkg/pub_integration/tool/trigger_puppeteer_download.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:puppeteer/puppeteer.dart'; + +Future main() async { + await downloadChrome(cachePath: '.dart_tool/puppeteer/chromium'); +} From c325e80bc892ce4b60042b2cc0875b3756e728f2 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 19 Sep 2025 11:47:46 +0200 Subject: [PATCH 2/5] remove mono_repo --- Dockerfile.app | 2 +- app/lib/shared/versions.dart | 2 +- app/mono_pkg.yaml | 43 ----- app/test/shared/versions_test.dart | 2 - mono_repo.yaml | 9 -- pkg/_pub_shared/mono_pkg.yaml | 11 -- pkg/api_builder/mono_pkg.yaml | 11 -- pkg/fake_gcloud/mono_pkg.yaml | 11 -- pkg/indexed_blob/mono_pkg.yaml | 11 -- pkg/pub_integration/mono_pkg.yaml | 19 --- pkg/pub_package_reader/mono_pkg.yaml | 11 -- pkg/pub_worker/mono_pkg.yaml | 13 -- pkg/puppeteer_screenshots/mono_pkg.yaml | 11 -- pkg/web_app/mono_pkg.yaml | 13 -- pkg/web_css/mono_pkg.yaml | 13 -- pubspec.lock | 8 - pubspec.yaml | 1 - tool/ci.sh | 199 ------------------------ tool/update_mono_pkg_yaml.dart | 59 ------- 19 files changed, 2 insertions(+), 447 deletions(-) delete mode 100644 app/mono_pkg.yaml delete mode 100644 mono_repo.yaml delete mode 100644 pkg/_pub_shared/mono_pkg.yaml delete mode 100644 pkg/api_builder/mono_pkg.yaml delete mode 100644 pkg/fake_gcloud/mono_pkg.yaml delete mode 100644 pkg/indexed_blob/mono_pkg.yaml delete mode 100644 pkg/pub_integration/mono_pkg.yaml delete mode 100644 pkg/pub_package_reader/mono_pkg.yaml delete mode 100644 pkg/pub_worker/mono_pkg.yaml delete mode 100644 pkg/puppeteer_screenshots/mono_pkg.yaml delete mode 100644 pkg/web_app/mono_pkg.yaml delete mode 100644 pkg/web_css/mono_pkg.yaml delete mode 100755 tool/ci.sh delete mode 100644 tool/update_mono_pkg_yaml.dart diff --git a/Dockerfile.app b/Dockerfile.app index 537fbf9f85..e7e3ae8e59 100644 --- a/Dockerfile.app +++ b/Dockerfile.app @@ -1,4 +1,4 @@ -# Keep version in-sync with .mono_repo.yml and app/lib/shared/versions.dart +# Keep version in-sync with .github/workflows/all-test.yml and app/lib/shared/versions.dart FROM dart:3.9.0 # After install we remove the apt-index again to keep the docker image diff small. diff --git a/app/lib/shared/versions.dart b/app/lib/shared/versions.dart index f1398365bf..f47c65422f 100644 --- a/app/lib/shared/versions.dart +++ b/app/lib/shared/versions.dart @@ -60,7 +60,7 @@ String get gcBeforeRuntimeVersion => acceptedRuntimeVersions.last; bool shouldGCVersion(String version) => version.compareTo(gcBeforeRuntimeVersion) < 0; -// keep in-sync with SDK version in .mono_repo.yml and Dockerfile +// keep in-sync with SDK version in .github/workflows/all-test.yml and Dockerfile.app final String runtimeSdkVersion = '3.9.0'; final String toolStableDartSdkVersion = '3.9.3'; final String toolStableFlutterSdkVersion = '3.35.3'; diff --git a/app/mono_pkg.yaml b/app/mono_pkg.yaml deleted file mode 100644 index 0d8dd6959f..0000000000 --- a/app/mono_pkg.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - build_test: - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P build-only -j 1 - - unit_test: - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 0 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 1 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 2 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 3 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 4 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 5 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 6 - - group: - - command: sudo apt-get update -yq && sudo apt-get install webp - - test: -P presubmit --total-shards 8 --shard-index 7 - -cache: - directories: - - ".dart_tool/pub-test-profile" - - ".dart_tool/pub-search-data" diff --git a/app/test/shared/versions_test.dart b/app/test/shared/versions_test.dart index 8e1b7067c4..683d681a2f 100644 --- a/app/test/shared/versions_test.dart +++ b/app/test/shared/versions_test.dart @@ -80,8 +80,6 @@ void main() { test('runtime sdk version should match CI and dockerfile', () async { final String docker = await File('../Dockerfile.app').readAsString(); expect(docker.contains('\nFROM dart:$runtimeSdkVersion\n'), isTrue); - final String monoPkg = await File('mono_pkg.yaml').readAsString(); - expect(monoPkg.contains('$runtimeSdkVersion'), isTrue); final ci = await File('../.github/workflows/all-test.yml').readAsString(); expect(ci.contains("DART_SDK_VERSION: '$runtimeSdkVersion'"), isTrue); }); diff --git a/mono_repo.yaml b/mono_repo.yaml deleted file mode 100644 index 70357aa917..0000000000 --- a/mono_repo.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -self_validate: smoke_test -pub_action: get - -github: - cron: "0 0 * * 0" - -merge_stages: - - smoke_test diff --git a/pkg/_pub_shared/mono_pkg.yaml b/pkg/_pub_shared/mono_pkg.yaml deleted file mode 100644 index d799ecfbbe..0000000000 --- a/pkg/_pub_shared/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - unit_test: - - test: --run-skipped diff --git a/pkg/api_builder/mono_pkg.yaml b/pkg/api_builder/mono_pkg.yaml deleted file mode 100644 index 30ac5e499b..0000000000 --- a/pkg/api_builder/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://github.com/dart-lang/mono_repo for details -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . -# - unit_test: -# - test: --run-skipped diff --git a/pkg/fake_gcloud/mono_pkg.yaml b/pkg/fake_gcloud/mono_pkg.yaml deleted file mode 100644 index 71420f2668..0000000000 --- a/pkg/fake_gcloud/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - unit_test: - - test: --run-skipped diff --git a/pkg/indexed_blob/mono_pkg.yaml b/pkg/indexed_blob/mono_pkg.yaml deleted file mode 100644 index 4c966478d4..0000000000 --- a/pkg/indexed_blob/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - unit_test: - - test: --run-skipped diff --git a/pkg/pub_integration/mono_pkg.yaml b/pkg/pub_integration/mono_pkg.yaml deleted file mode 100644 index 8f2a5435d9..0000000000 --- a/pkg/pub_integration/mono_pkg.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - # dart analyze doesn't support multiple dirs. A bug? - - analyze: --fatal-infos lib/ - - analyze: --fatal-infos test/ - - unit_test: - # Instead of --total-shards and --shard index, we are using file-based sharding, - # as it provided better distribution of the tests. - # https://github.com/dart-lang/test/issues/2141 - - test: -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '0~4p'` - - test: -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '1~4p'` - - test: -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '2~4p'` - - test: -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '3~4p'` diff --git a/pkg/pub_package_reader/mono_pkg.yaml b/pkg/pub_package_reader/mono_pkg.yaml deleted file mode 100644 index 71420f2668..0000000000 --- a/pkg/pub_package_reader/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - unit_test: - - test: --run-skipped diff --git a/pkg/pub_worker/mono_pkg.yaml b/pkg/pub_worker/mono_pkg.yaml deleted file mode 100644 index 52a3c47c4a..0000000000 --- a/pkg/pub_worker/mono_pkg.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos --fatal-warnings bin/ lib/ - - unit_test: - - test: --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '0~3p'` - - test: --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '1~3p'` - - test: --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '2~3p'` diff --git a/pkg/puppeteer_screenshots/mono_pkg.yaml b/pkg/puppeteer_screenshots/mono_pkg.yaml deleted file mode 100644 index 4c966478d4..0000000000 --- a/pkg/puppeteer_screenshots/mono_pkg.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - unit_test: - - test: --run-skipped diff --git a/pkg/web_app/mono_pkg.yaml b/pkg/web_app/mono_pkg.yaml deleted file mode 100644 index 68356e8746..0000000000 --- a/pkg/web_app/mono_pkg.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - build: - - command: ./build.sh - - unit_test: - - test: --run-skipped diff --git a/pkg/web_css/mono_pkg.yaml b/pkg/web_css/mono_pkg.yaml deleted file mode 100644 index 68356e8746..0000000000 --- a/pkg/web_css/mono_pkg.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# See https://pub.dev/packages/mono_repo for details on this file -sdk: - - 3.9.0 - -stages: - - smoke_test: - - group: - - format - - analyze: --fatal-infos . - - build: - - command: ./build.sh - - unit_test: - - test: --run-skipped diff --git a/pubspec.lock b/pubspec.lock index abd2ecf9da..d52fad8a22 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -545,14 +545,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" - mono_repo: - dependency: "direct dev" - description: - name: mono_repo - sha256: "442806126e36d053bf4a305f65fb8f51990bb96115d76522237ac9e7feecf214" - url: "https://pub.dev" - source: hosted - version: "6.6.3" native_stack_traces: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 78f1b83c5e..056a4fdfa4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,4 +18,3 @@ workspace: dev_dependencies: lints: ^6.0.0 - mono_repo: ^6.6.2 diff --git a/tool/ci.sh b/tool/ci.sh deleted file mode 100755 index cdb918f3aa..0000000000 --- a/tool/ci.sh +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -# Created with package:mono_repo v6.6.3 - -# Support built in commands on windows out of the box. - -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter pub" is called instead of "dart pub". -# This assumes that the Flutter SDK has been installed in a previous step. -function pub() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter pub "$@" - else - command dart pub "$@" - fi -} - -function format() { - command dart format "$@" -} - -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter analyze" is called instead of "dart analyze". -# This assumes that the Flutter SDK has been installed in a previous step. -function analyze() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter analyze "$@" - else - command dart analyze "$@" - fi -} - -if [[ -z ${PKGS} ]]; then - echo -e '\033[31mPKGS environment variable must be set! - TERMINATING JOB\033[0m' - exit 64 -fi - -if [[ "$#" == "0" ]]; then - echo -e '\033[31mAt least one task argument must be provided! - TERMINATING JOB\033[0m' - exit 64 -fi - -SUCCESS_COUNT=0 -declare -a FAILURES - -for PKG in ${PKGS}; do - echo -e "\033[1mPKG: ${PKG}\033[22m" - EXIT_CODE=0 - pushd "${PKG}" >/dev/null || EXIT_CODE=$? - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: '${PKG}' does not exist - TERMINATING JOB\033[0m" - exit 64 - fi - - dart pub get || EXIT_CODE=$? - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: ${PKG}; 'dart pub get' - FAILED (${EXIT_CODE})\033[0m" - FAILURES+=("${PKG}; 'dart pub get'") - else - for TASK in "$@"; do - EXIT_CODE=0 - echo - echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" - case ${TASK} in - analyze_0) - echo 'dart analyze --fatal-infos .' - dart analyze --fatal-infos . || EXIT_CODE=$? - ;; - analyze_1) - echo 'dart analyze --fatal-infos .' - dart analyze --fatal-infos . || EXIT_CODE=$? - ;; - analyze_2) - echo 'dart analyze --fatal-infos lib/' - dart analyze --fatal-infos lib/ || EXIT_CODE=$? - ;; - analyze_3) - echo 'dart analyze --fatal-infos test/' - dart analyze --fatal-infos test/ || EXIT_CODE=$? - ;; - analyze_4) - echo 'dart analyze --fatal-infos --fatal-warnings bin/ lib/' - dart analyze --fatal-infos --fatal-warnings bin/ lib/ || EXIT_CODE=$? - ;; - command_0) - echo 'sudo apt-get update -yq && sudo apt-get install webp' - sudo apt-get update -yq && sudo apt-get install webp || EXIT_CODE=$? - ;; - command_1) - echo './build.sh' - ./build.sh || EXIT_CODE=$? - ;; - format) - echo 'dart format --output=none --set-exit-if-changed .' - dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? - ;; - test_00) - echo 'dart test -P build-only -j 1' - dart test -P build-only -j 1 || EXIT_CODE=$? - ;; - test_01) - echo 'dart test -P presubmit --total-shards 8 --shard-index 0' - dart test -P presubmit --total-shards 8 --shard-index 0 || EXIT_CODE=$? - ;; - test_02) - echo 'dart test -P presubmit --total-shards 8 --shard-index 1' - dart test -P presubmit --total-shards 8 --shard-index 1 || EXIT_CODE=$? - ;; - test_03) - echo 'dart test -P presubmit --total-shards 8 --shard-index 2' - dart test -P presubmit --total-shards 8 --shard-index 2 || EXIT_CODE=$? - ;; - test_04) - echo 'dart test -P presubmit --total-shards 8 --shard-index 3' - dart test -P presubmit --total-shards 8 --shard-index 3 || EXIT_CODE=$? - ;; - test_05) - echo 'dart test -P presubmit --total-shards 8 --shard-index 4' - dart test -P presubmit --total-shards 8 --shard-index 4 || EXIT_CODE=$? - ;; - test_06) - echo 'dart test -P presubmit --total-shards 8 --shard-index 5' - dart test -P presubmit --total-shards 8 --shard-index 5 || EXIT_CODE=$? - ;; - test_07) - echo 'dart test -P presubmit --total-shards 8 --shard-index 6' - dart test -P presubmit --total-shards 8 --shard-index 6 || EXIT_CODE=$? - ;; - test_08) - echo 'dart test -P presubmit --total-shards 8 --shard-index 7' - dart test -P presubmit --total-shards 8 --shard-index 7 || EXIT_CODE=$? - ;; - test_09) - echo 'dart test --run-skipped' - dart test --run-skipped || EXIT_CODE=$? - ;; - test_10) - echo 'dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '0~4p'`' - dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '0~4p'` || EXIT_CODE=$? - ;; - test_11) - echo 'dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '1~4p'`' - dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '1~4p'` || EXIT_CODE=$? - ;; - test_12) - echo 'dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '2~4p'`' - dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '2~4p'` || EXIT_CODE=$? - ;; - test_13) - echo 'dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '3~4p'`' - dart test -j1 --run-skipped `find test -name "*_test\\.dart" | sort | sed -n '3~4p'` || EXIT_CODE=$? - ;; - test_14) - echo 'dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '0~3p'`' - dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '0~3p'` || EXIT_CODE=$? - ;; - test_15) - echo 'dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '1~3p'`' - dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '1~3p'` || EXIT_CODE=$? - ;; - test_16) - echo 'dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '2~3p'`' - dart test --run-skipped --concurrency=1 `find test -name "*_test\\.dart" | sort | sed -n '2~3p'` || EXIT_CODE=$? - ;; - *) - echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m" - exit 64 - ;; - esac - - if [[ ${EXIT_CODE} -ne 0 ]]; then - echo -e "\033[31mPKG: ${PKG}; TASK: ${TASK} - FAILED (${EXIT_CODE})\033[0m" - FAILURES+=("${PKG}; TASK: ${TASK}") - else - echo -e "\033[32mPKG: ${PKG}; TASK: ${TASK} - SUCCEEDED\033[0m" - SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) - fi - - done - fi - - echo - echo -e "\033[32mSUCCESS COUNT: ${SUCCESS_COUNT}\033[0m" - - if [ ${#FAILURES[@]} -ne 0 ]; then - echo -e "\033[31mFAILURES: ${#FAILURES[@]}\033[0m" - for i in "${FAILURES[@]}"; do - echo -e "\033[31m $i\033[0m" - done - fi - - popd >/dev/null || exit 70 - echo -done - -if [ ${#FAILURES[@]} -ne 0 ]; then - exit 1 -fi diff --git a/tool/update_mono_pkg_yaml.dart b/tool/update_mono_pkg_yaml.dart deleted file mode 100644 index e1e30fe664..0000000000 --- a/tool/update_mono_pkg_yaml.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:io'; - -/// Updates mono_pkg.yaml files with the current Dart SDK runtime. -/// When an extra command line argument is provided, it will be used -/// instead of the current Dart SDK runtime. -void main(List args) { - final sdkVersion = - args.isEmpty ? Platform.version.split(' ').first : args.first; - - final baseDir = _inferPubDevBaseDir(); - final packagePaths = _detectPackagePaths(baseDir); - - for (final path in packagePaths) { - _updatePackage('$baseDir/$path', sdkVersion); - } -} - -String _inferPubDevBaseDir() { - return Platform.script - .toFilePath() - .split('/') - .reversed - .skip(2) - .toList() - .reversed - .join('/'); -} - -List _detectPackagePaths(String baseDir) { - return [ - 'app', - ...Directory('$baseDir/pkg') - .listSync() - .whereType() - .map((d) => d.path.split('/').last) - .map((e) => 'pkg/$e') - .toList(), - ]; -} - -void _updatePackage(String path, String sdkVersion) { - final monoPkg = File('$path/mono_pkg.yaml'); - if (monoPkg.existsSync()) { - print('updating: ${monoPkg.path}'); - final lines = monoPkg.readAsLinesSync(); - final index = lines.indexOf('sdk:'); - if (index >= 0 && - index + 2 < lines.length && - lines[index + 1].startsWith(' - ') && - lines[index + 2].isEmpty) { - lines[index + 1] = ' - $sdkVersion'; - monoPkg.writeAsStringSync(lines.join('\n') + '\n'); - } - } -} From da9e336b59ddc6ddb9522dbdc09ed2b91edb050b Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 19 Sep 2025 12:30:19 +0200 Subject: [PATCH 3/5] Additional tool. --- doc/development.md | 34 ++++------------------------------ tool/run-pub-in-all.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 30 deletions(-) create mode 100755 tool/run-pub-in-all.sh diff --git a/doc/development.md b/doc/development.md index 25b0a8970e..fbf7becdb9 100644 --- a/doc/development.md +++ b/doc/development.md @@ -100,43 +100,17 @@ annotations. Input files are usually listed in `build.yaml`, and generated files usually suffixed `.g.dart`. To generate code use: ```bash -dart run build_runner build +./tool/codegen.sh ``` -## Working with `mono_repo` - -The app uses [`mono_repo`](https://pub.dev/packages/mono_repo) to organize -multiple packages inside the repository. - -### Setup / activate `mono_repo` - -To use `mono_repo`, first activate it: - -```bash -dart pub global activate mono_repo -``` - -> Note: Run `pub global list` to make sure the version is at least `2.0.0`. - -`mono_repo` has two kinds of configuration files: -- `mono_repo.yaml` (in the root directory) -- `mono_pkg.yaml` (in each package directory) - ### Update/upgrade dependencies ```bash -dart pub global run mono_repo pub get -``` - -### Update/upgrade SDK in all mono_pkg.yaml - -```bash -dart tool/update_mono_pkg_yaml.dart -dart pub global run mono_repo generate +./tool/run-pub-in-all.sh upgrade ``` ### Creating a new package (or vendoring existing packages) -1. Create `mono_pkg.yaml` for the package. (Use the existing ones as template.) +1. Include the package in the root-level workspace. -2. Run `dart pub global run mono_repo generate` from the root. +2. Use `resolution: workspace` in the new package's `pubspec.yaml`. diff --git a/tool/run-pub-in-all.sh b/tool/run-pub-in-all.sh new file mode 100755 index 0000000000..57864b0218 --- /dev/null +++ b/tool/run-pub-in-all.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# This script runs a 'dart pub {rest of the args}' command in `app/` and in each sub-directory of the 'pkg/' folder. + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "$SCRIPT_DIR/.." + +cd "$SCRIPT_DIR/../app" +pwd +dart pub $* + +cd "$SCRIPT_DIR/.." +# Find all subdirectories in 'pkg/' and loop through them. +find pkg -mindepth 1 -maxdepth 1 -type d | while read dir; do + cd "$SCRIPT_DIR/../$dir" + pwd + dart pub $* +done From d6c42a8f9ded59aa105067982538ff565ff808f6 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 19 Sep 2025 13:16:40 +0200 Subject: [PATCH 4/5] Remove run-pub-in-all.sh --- doc/development.md | 4 +++- tool/run-pub-in-all.sh | 19 ------------------- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100755 tool/run-pub-in-all.sh diff --git a/doc/development.md b/doc/development.md index fbf7becdb9..334d54581c 100644 --- a/doc/development.md +++ b/doc/development.md @@ -105,8 +105,10 @@ files usually suffixed `.g.dart`. To generate code use: ### Update/upgrade dependencies +Run `pub upgrade` in the root to upgrade the entire workspace: + ```bash -./tool/run-pub-in-all.sh upgrade +dart pub upgrade ``` ### Creating a new package (or vendoring existing packages) diff --git a/tool/run-pub-in-all.sh b/tool/run-pub-in-all.sh deleted file mode 100755 index 57864b0218..0000000000 --- a/tool/run-pub-in-all.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# This script runs a 'dart pub {rest of the args}' command in `app/` and in each sub-directory of the 'pkg/' folder. - -set -e - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "$SCRIPT_DIR/.." - -cd "$SCRIPT_DIR/../app" -pwd -dart pub $* - -cd "$SCRIPT_DIR/.." -# Find all subdirectories in 'pkg/' and loop through them. -find pkg -mindepth 1 -maxdepth 1 -type d | while read dir; do - cd "$SCRIPT_DIR/../$dir" - pwd - dart pub $* -done From 6781e054d43c90ce509c2f12772fe810e9091a99 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 19 Sep 2025 13:18:03 +0200 Subject: [PATCH 5/5] TODO on using dart pub workspace list --json --- .github/workflows/all-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/all-test.yml b/.github/workflows/all-test.yml index 79aaeb188e..6b1823c311 100644 --- a/.github/workflows/all-test.yml +++ b/.github/workflows/all-test.yml @@ -68,6 +68,7 @@ jobs: strategy: fail-fast: false matrix: + # TODO: use `dart pub workspace list --json` to get this list package: - api_builder - code_coverage