Skip to content

Commit 5f965fe

Browse files
authored
tweak dep in build_cli (#179)
* fix tests
1 parent d01ba0b commit 5f965fe

File tree

4 files changed

+90
-13
lines changed

4 files changed

+90
-13
lines changed

.github/workflows/dart.yml

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ jobs:
204204
needs:
205205
- job_001
206206
job_006:
207-
name: "unit_test; Dart 3.8.0; PKG: build_cli; `dart test --run-skipped --reporter expanded`"
207+
name: "unit_test; Dart 3.8.0; PKG: build_cli; `dart test --run-skipped --tags presubmit-only`"
208208
runs-on: ubuntu-latest
209209
steps:
210210
- name: Cache Pub hosted dependencies
211211
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
212212
with:
213213
path: "~/.pub-cache/hosted"
214-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:build_cli;commands:test"
214+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:build_cli;commands:test_1"
215215
restore-keys: |
216216
os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:build_cli
217217
os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0
@@ -229,8 +229,8 @@ jobs:
229229
run: dart pub upgrade
230230
if: "always() && steps.checkout.conclusion == 'success'"
231231
working-directory: build_cli
232-
- name: "build_cli; dart test --run-skipped --reporter expanded"
233-
run: dart test --run-skipped --reporter expanded
232+
- name: "build_cli; dart test --run-skipped --tags presubmit-only"
233+
run: dart test --run-skipped --tags presubmit-only
234234
if: "always() && steps.build_cli_pub_upgrade.conclusion == 'success'"
235235
working-directory: build_cli
236236
needs:
@@ -240,14 +240,86 @@ jobs:
240240
- job_004
241241
- job_005
242242
job_007:
243-
name: "unit_test; Dart dev; PKG: build_cli; `dart test --run-skipped --reporter expanded`"
243+
name: "unit_test; Dart 3.8.0; PKG: build_cli; `dart test`"
244244
runs-on: ubuntu-latest
245245
steps:
246246
- name: Cache Pub hosted dependencies
247247
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
248248
with:
249249
path: "~/.pub-cache/hosted"
250-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:build_cli;commands:test"
250+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:build_cli;commands:test_0"
251+
restore-keys: |
252+
os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0;packages:build_cli
253+
os:ubuntu-latest;pub-cache-hosted;sdk:3.8.0
254+
os:ubuntu-latest;pub-cache-hosted
255+
os:ubuntu-latest
256+
- name: Setup Dart SDK
257+
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
258+
with:
259+
sdk: "3.8.0"
260+
- id: checkout
261+
name: Checkout repository
262+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
263+
- id: build_cli_pub_upgrade
264+
name: build_cli; dart pub upgrade
265+
run: dart pub upgrade
266+
if: "always() && steps.checkout.conclusion == 'success'"
267+
working-directory: build_cli
268+
- name: build_cli; dart test
269+
run: dart test
270+
if: "always() && steps.build_cli_pub_upgrade.conclusion == 'success'"
271+
working-directory: build_cli
272+
needs:
273+
- job_001
274+
- job_002
275+
- job_003
276+
- job_004
277+
- job_005
278+
job_008:
279+
name: "unit_test; Dart dev; PKG: build_cli; `dart test --run-skipped --tags presubmit-only`"
280+
runs-on: ubuntu-latest
281+
steps:
282+
- name: Cache Pub hosted dependencies
283+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
284+
with:
285+
path: "~/.pub-cache/hosted"
286+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:build_cli;commands:test_1"
287+
restore-keys: |
288+
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:build_cli
289+
os:ubuntu-latest;pub-cache-hosted;sdk:dev
290+
os:ubuntu-latest;pub-cache-hosted
291+
os:ubuntu-latest
292+
- name: Setup Dart SDK
293+
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
294+
with:
295+
sdk: dev
296+
- id: checkout
297+
name: Checkout repository
298+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
299+
- id: build_cli_pub_upgrade
300+
name: build_cli; dart pub upgrade
301+
run: dart pub upgrade
302+
if: "always() && steps.checkout.conclusion == 'success'"
303+
working-directory: build_cli
304+
- name: "build_cli; dart test --run-skipped --tags presubmit-only"
305+
run: dart test --run-skipped --tags presubmit-only
306+
if: "always() && steps.build_cli_pub_upgrade.conclusion == 'success'"
307+
working-directory: build_cli
308+
needs:
309+
- job_001
310+
- job_002
311+
- job_003
312+
- job_004
313+
- job_005
314+
job_009:
315+
name: "unit_test; Dart dev; PKG: build_cli; `dart test`"
316+
runs-on: ubuntu-latest
317+
steps:
318+
- name: Cache Pub hosted dependencies
319+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
320+
with:
321+
path: "~/.pub-cache/hosted"
322+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:build_cli;commands:test_0"
251323
restore-keys: |
252324
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:build_cli
253325
os:ubuntu-latest;pub-cache-hosted;sdk:dev
@@ -265,8 +337,8 @@ jobs:
265337
run: dart pub upgrade
266338
if: "always() && steps.checkout.conclusion == 'success'"
267339
working-directory: build_cli
268-
- name: "build_cli; dart test --run-skipped --reporter expanded"
269-
run: dart test --run-skipped --reporter expanded
340+
- name: build_cli; dart test
341+
run: dart test
270342
if: "always() && steps.build_cli_pub_upgrade.conclusion == 'success'"
271343
working-directory: build_cli
272344
needs:

build_cli/mono_pkg.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ stages:
88
- analyze: --fatal-infos .
99
- format
1010
- unit_test:
11-
- test: --run-skipped --reporter expanded
11+
- test:
12+
- test: --run-skipped --tags presubmit-only

build_cli/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
build: ^4.0.0
1616
# Limit version range on build_cli_annotations
1717
# new features need to stay in sync
18-
build_cli_annotations: ">=2.1.1-wip <2.2.0"
18+
build_cli_annotations: ">=2.1.1 <2.2.0"
1919
build_config: ^1.2.0
2020
pub_semver: ^2.1.4
2121
source_gen: ^4.0.1

tool/ci.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ for PKG in ${PKGS}; do
7171
echo 'dart format --output=none --set-exit-if-changed .'
7272
dart format --output=none --set-exit-if-changed . || EXIT_CODE=$?
7373
;;
74-
test)
75-
echo 'dart test --run-skipped --reporter expanded'
76-
dart test --run-skipped --reporter expanded || EXIT_CODE=$?
74+
test_0)
75+
echo 'dart test'
76+
dart test || EXIT_CODE=$?
77+
;;
78+
test_1)
79+
echo 'dart test --run-skipped --tags presubmit-only'
80+
dart test --run-skipped --tags presubmit-only || EXIT_CODE=$?
7781
;;
7882
*)
7983
echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m"

0 commit comments

Comments
 (0)