File tree Expand file tree Collapse file tree
packages/allure_flutter_test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 working-directory : packages/allure_flutter_test
5353 run : flutter test test
5454
55+ - name : Publish dry-run
56+ run : bash scripts/publish-dry-run.sh
57+
5558 publish-commons :
5659 name : Publish allure_dart_commons
5760 if : startsWith(github.ref_name, 'allure_dart_commons-v')
Original file line number Diff line number Diff line change 5959 working-directory : packages/allure_flutter_test
6060 run : flutter analyze --no-fatal-infos
6161
62+ - name : Publish dry-run
63+ run : bash scripts/publish-dry-run.sh
64+
6265 build :
6366 name : Build (${{ matrix.name }})
6467 runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change @@ -56,6 +56,15 @@ dart analyze
5656
5757and, when Flutter is available, analyzes ` allure_flutter_test ` .
5858
59+ Before a release, also validate pub.dev packaging:
60+
61+ ``` bash
62+ bash scripts/publish-dry-run.sh
63+ ```
64+
65+ CI runs that dry-run on every pull request so unconstrained dependencies and
66+ similar publish blockers fail before tagging.
67+
5968## Running Tests
6069
6170The default contributor path is the normal Dart and Flutter test runners.
Original file line number Diff line number Diff line change 11# LocalFileComparator failure diffs written next to goldens during test runs
22** /failures /
3+
4+ # Accidental local packages created while experimenting with flutter create
5+ flutter_package_ * /
Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ pubspec_overrides.yaml
77build/
88allure-results/
99allure-report/
10+ flutter_package_*/
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ dependencies:
1818 sdk : flutter
1919 integration_test :
2020 sdk : flutter
21- # Version is pinned by the Flutter SDK's own flutter_test dependency, so
22- # use `any` rather than a manually tracked constraint .
23- leak_tracker_flutter_testing : any
24- test_api : any
21+ # Declared for pub.dev (unconstrained `any` is rejected). Keep these wide so
22+ # Flutter SDK's own flutter_test pins can select the matching versions .
23+ leak_tracker_flutter_testing : ^3.0.0
24+ test_api : ^0.7.0
2525
2626dev_dependencies :
2727 lints : ^6.1.0
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Validate that packages can be published to pub.dev.
3+ # Fails on pub publish warnings (for example unconstrained dependencies).
4+ set -euo pipefail
5+
6+ root=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
7+ cd " ${root} "
8+
9+ overrides=" ${root} /packages/allure_flutter_test/pubspec_overrides.yaml"
10+ if [[ -f " ${overrides} " ]]; then
11+ echo " ==> removing Flutter workspace overrides for publish dry-run"
12+ rm -f " ${overrides} "
13+ fi
14+
15+ echo " ==> dart pub get (workspace)"
16+ dart pub get
17+
18+ for package in allure_dart_commons allure_dart_test; do
19+ echo " ==> dart pub publish --dry-run (${package} )"
20+ (
21+ cd " packages/${package} "
22+ dart pub publish --dry-run
23+ )
24+ done
25+
26+ echo " ==> flutter pub get (allure_flutter_test)"
27+ (
28+ cd packages/allure_flutter_test
29+ flutter pub get
30+ )
31+
32+ echo " ==> flutter pub publish --dry-run (allure_flutter_test)"
33+ (
34+ cd packages/allure_flutter_test
35+ # Prefer flutter pub so local Flutter SDK resolution matches CI publishers.
36+ if ! flutter pub publish --dry-run; then
37+ echo " allure_flutter_test publish dry-run failed" >&2
38+ exit 1
39+ fi
40+ )
41+
42+ echo " ==> publish dry-run passed"
You can’t perform that action at this time.
0 commit comments