From 01e8e92f3bbe0e06bdd06dbbeacd3d6b750b0070 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 16 Oct 2024 16:53:20 +0200 Subject: [PATCH] Do not use pub workspace for fake_async --- .github/workflows/dart.yml | 158 +++++++++++++++++------------------ pkgs/fake_async/pubspec.yaml | 6 +- pubspec.yaml | 1 - 3 files changed, 81 insertions(+), 84 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 33ea69484..6f76daaf7 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,6 +40,36 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: + name: "analyze_and_format; linux; Dart 3.3.0; PKG: pkgs/fake_async; `dart analyze`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/fake_async;commands:analyze_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/fake_async + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + with: + sdk: "3.3.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - id: pkgs_fake_async_pub_upgrade + name: pkgs/fake_async; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/fake_async + - name: pkgs/fake_async; dart analyze + run: dart analyze + if: "always() && steps.pkgs_fake_async_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/fake_async + job_003: name: "analyze_and_format; linux; Dart 3.5.0-311.0.dev; PKGS: integration_tests/regression, integration_tests/wasm; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -86,7 +116,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.integration_tests_wasm_pub_upgrade.conclusion == 'success'" working-directory: integration_tests/wasm - job_003: + job_004: name: "analyze_and_format; linux; Dart 3.5.0-311.0.dev; PKGS: pkgs/checks, pkgs/test_core; `dart analyze`" runs-on: ubuntu-latest steps: @@ -125,36 +155,6 @@ jobs: run: dart analyze if: "always() && steps.pkgs_test_core_pub_upgrade.conclusion == 'success'" working-directory: pkgs/test_core - job_004: - name: "analyze_and_format; linux; Dart 3.5.0; PKG: pkgs/fake_async; `dart analyze`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/fake_async;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/fake_async - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: "3.5.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - id: pkgs_fake_async_pub_upgrade - name: pkgs/fake_async; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/fake_async - - name: pkgs/fake_async; dart analyze - run: dart analyze - if: "always() && steps.pkgs_fake_async_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/fake_async job_005: name: "analyze_and_format; linux; Dart dev; PKGS: integration_tests/regression, integration_tests/spawn_hybrid, integration_tests/wasm, pkgs/checks, pkgs/fake_async, pkgs/test, pkgs/test_api, pkgs/test_core; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`" runs-on: ubuntu-latest @@ -329,6 +329,44 @@ jobs: if: "always() && steps.integration_tests_wasm_pub_upgrade.conclusion == 'success'" working-directory: integration_tests/wasm job_008: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/fake_async; `dart test`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/fake_async;commands:command_00" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/fake_async + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + with: + sdk: "3.3.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - id: pkgs_fake_async_pub_upgrade + name: pkgs/fake_async; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/fake_async + - name: pkgs/fake_async; dart test + run: dart test + if: "always() && steps.pkgs_fake_async_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/fake_async + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_009: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: integration_tests/regression; `dart test`" runs-on: ubuntu-latest steps: @@ -366,7 +404,7 @@ jobs: - job_005 - job_006 - job_007 - job_009: + job_010: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/checks; `dart test`" runs-on: ubuntu-latest steps: @@ -404,7 +442,7 @@ jobs: - job_005 - job_006 - job_007 - job_010: + job_011: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test_core; `dart test`" runs-on: ubuntu-latest steps: @@ -442,7 +480,7 @@ jobs: - job_005 - job_006 - job_007 - job_011: + job_012: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: integration_tests/spawn_hybrid; `dart test -p chrome,vm,node`" runs-on: ubuntu-latest steps: @@ -480,7 +518,7 @@ jobs: - job_005 - job_006 - job_007 - job_012: + job_013: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: integration_tests/wasm; `dart test --timeout=60s`" runs-on: ubuntu-latest steps: @@ -518,7 +556,7 @@ jobs: - job_005 - job_006 - job_007 - job_013: + job_014: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test; `xvfb-run -s \"-screen 0 1024x768x24\" dart test --preset travis --total-shards 5 --shard-index 0`" runs-on: ubuntu-latest steps: @@ -556,7 +594,7 @@ jobs: - job_005 - job_006 - job_007 - job_014: + job_015: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test; `xvfb-run -s \"-screen 0 1024x768x24\" dart test --preset travis --total-shards 5 --shard-index 1`" runs-on: ubuntu-latest steps: @@ -594,7 +632,7 @@ jobs: - job_005 - job_006 - job_007 - job_015: + job_016: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test; `xvfb-run -s \"-screen 0 1024x768x24\" dart test --preset travis --total-shards 5 --shard-index 2`" runs-on: ubuntu-latest steps: @@ -632,7 +670,7 @@ jobs: - job_005 - job_006 - job_007 - job_016: + job_017: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test; `xvfb-run -s \"-screen 0 1024x768x24\" dart test --preset travis --total-shards 5 --shard-index 3`" runs-on: ubuntu-latest steps: @@ -670,7 +708,7 @@ jobs: - job_005 - job_006 - job_007 - job_017: + job_018: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test; `xvfb-run -s \"-screen 0 1024x768x24\" dart test --preset travis --total-shards 5 --shard-index 4`" runs-on: ubuntu-latest steps: @@ -708,7 +746,7 @@ jobs: - job_005 - job_006 - job_007 - job_018: + job_019: name: "unit_test; linux; Dart 3.5.0-311.0.dev; PKG: pkgs/test_api; `dart test --preset travis -x browser`" runs-on: ubuntu-latest steps: @@ -746,44 +784,6 @@ jobs: - job_005 - job_006 - job_007 - job_019: - name: "unit_test; linux; Dart 3.5.0; PKG: pkgs/fake_async; `dart test`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/fake_async;commands:command_00" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/fake_async - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: "3.5.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - id: pkgs_fake_async_pub_upgrade - name: pkgs/fake_async; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/fake_async - - name: pkgs/fake_async; dart test - run: dart test - if: "always() && steps.pkgs_fake_async_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/fake_async - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 job_020: name: "unit_test; linux; Dart dev; PKG: integration_tests/regression; `dart test`" runs-on: ubuntu-latest diff --git a/pkgs/fake_async/pubspec.yaml b/pkgs/fake_async/pubspec.yaml index f681f12c3..f345860ba 100644 --- a/pkgs/fake_async/pubspec.yaml +++ b/pkgs/fake_async/pubspec.yaml @@ -4,10 +4,8 @@ description: >- Fake asynchronous events such as timers and microtasks for deterministic testing. repository: https://github.com/dart-lang/test/tree/master/pkgs/fake_async -resolution: workspace - environment: - sdk: ^3.5.0 + sdk: ^3.3.0 dependencies: clock: ^1.1.0 @@ -15,5 +13,5 @@ dependencies: dev_dependencies: async: ^2.5.0 - dart_flutter_team_lints: ^3.1.0 + dart_flutter_team_lints: ^2.0.0 test: ^1.16.0 diff --git a/pubspec.yaml b/pubspec.yaml index 4925a12bf..88154f075 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,6 @@ workspace: - integration_tests/spawn_hybrid - integration_tests/wasm - pkgs/checks - - pkgs/fake_async - pkgs/test - pkgs/test_api - pkgs/test_core