File tree Expand file tree Collapse file tree 10 files changed +591
-35
lines changed Expand file tree Collapse file tree 10 files changed +591
-35
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 33
44tags :
55 extension : # Extension tests require configuration, so we may exclude.
6- dev-sdk : # Tests that require dev SDK to pass, we may exclude them for stable SDK.
Original file line number Diff line number Diff line change @@ -6,11 +6,29 @@ stages:
66 - analyze : --fatal-infos .
77 - test : test/build/ensure_version_test.dart
88 dart : dev
9+ - group :
10+ - analyze : .
11+ - test : test/build/min_sdk_test.dart --run-skipped
12+ dart : stable
913 - unit_test :
1014 - group :
1115 - command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
1216 - test :
13- dart : dev
17+ dart :
18+ - dev
19+ - stable
1420 - test :
1521 os : windows
16- dart : dev
22+ dart :
23+ - dev
24+ - stable
25+ - beta_cron :
26+ - analyze : .
27+ dart : beta
28+ - group :
29+ - command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
30+ - test : -j 1
31+ dart : beta
32+ - test : -j 1
33+ os : windows
34+ dart : beta
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ // @dart = 2.9
6+
7+ @TestOn ('vm' )
8+ @Skip ('Intended to run in analyze stage on stable SDK only, see mono_pkg.yaml' )
9+ import 'dart:io' ;
10+
11+ import 'package:pub_semver/pub_semver.dart' ;
12+ import 'package:pubspec_parse/pubspec_parse.dart' ;
13+ import 'package:test/test.dart' ;
14+
15+ void main () {
16+ test ('dwds pubspec has the stable as min SDK constraint' , () {
17+ var pubspec = Pubspec .parse (File ('pubspec.yaml' ).readAsStringSync ());
18+ var sdkVersion = Version .parse (Platform .version.split (' ' )[0 ]);
19+ sdkVersion = Version (sdkVersion.major, sdkVersion.minor, 0 );
20+
21+ var sdkConstraint = VersionConstraint .compatibleWith (sdkVersion);
22+ var pubspecSdkConstraint = pubspec.environment['sdk' ];
23+ expect (sdkConstraint.allowsAll (pubspecSdkConstraint), true ,
24+ reason:
25+ 'Min sdk constraint is outdated. Please update SDK constraint in '
26+ 'pubspec to allow latest stable and backwards compatible versions.'
27+ '\n Current stable: $sdkVersion ,'
28+ '\n Dwds pubspec constraint: $pubspecSdkConstraint ' );
29+ });
30+ }
Original file line number Diff line number Diff line change @@ -9,5 +9,4 @@ environment:
99dev_dependencies :
1010 build_runner : ^2.0.0
1111 build_web_compilers : ^3.0.0
12- webdev :
13- path : ../webdev
12+ webdev : ^2.7.5
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ self_validate: analyzer_and_format
33github :
44 env :
55 DISPLAY : ' :99'
6- cron : ' 0 0 * * 0'
6+ cron : ' 0 0 * * 0' # "At 00:00 (UTC) on Sunday."
77 on_completion :
88 - name : " Notify failure"
99 runs-on : ubuntu-latest
@@ -16,6 +16,10 @@ github:
1616 "${CHAT_WEBHOOK_URL}"
1717 env:
1818 CHAT_WEBHOOK_URL: ${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}
19+ stages :
20+ - name : beta_cron
21+ # Only run this stage for scheduled cron jobs
22+ if : github.event_name == 'schedule'
1923
2024merge_stages :
2125- analyzer_and_format
Original file line number Diff line number Diff line change @@ -67,10 +67,14 @@ for PKG in ${PKGS}; do
6767 echo
6868 echo -e " \033[1mPKG: ${PKG} ; TASK: ${TASK} \033[22m"
6969 case ${TASK} in
70- analyze )
70+ analyze_0 )
7171 echo ' dart analyze --fatal-infos .'
7272 dart analyze --fatal-infos . || EXIT_CODE=$?
7373 ;;
74+ analyze_1)
75+ echo ' dart analyze .'
76+ dart analyze . || EXIT_CODE=$?
77+ ;;
7478 command)
7579 echo ' Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &'
7680 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & || EXIT_CODE=$?
@@ -84,17 +88,21 @@ for PKG in ${PKGS}; do
8488 dart test test/build/ensure_version_test.dart || EXIT_CODE=$?
8589 ;;
8690 test_1)
87- echo ' dart test'
88- dart test || EXIT_CODE=$?
91+ echo ' dart test test/build/min_sdk_test.dart --run-skipped '
92+ dart test test/build/min_sdk_test.dart --run-skipped || EXIT_CODE=$?
8993 ;;
9094 test_2)
91- echo ' dart test test/build/ensure_build_test.dart '
92- dart test test/build/ensure_build_test.dart || EXIT_CODE=$?
95+ echo ' dart test'
96+ dart test || EXIT_CODE=$?
9397 ;;
9498 test_3)
9599 echo ' dart test -j 1'
96100 dart test -j 1 || EXIT_CODE=$?
97101 ;;
102+ test_4)
103+ echo ' dart test test/build/ensure_build_test.dart'
104+ dart test test/build/ensure_build_test.dart || EXIT_CODE=$?
105+ ;;
98106 * )
99107 echo -e " \033[31mUnknown TASK '${TASK} ' - TERMINATING JOB\033[0m"
100108 exit 64
Original file line number Diff line number Diff line change 11retry : 3
22
3- tags :
4- dev-sdk : # Tests that require dev SDK to pass, we may exclude them for stable SDK.
5- unreleased-sdk : # Tests that require unpublished SDK to pass, so we may exclude them for stable and dev SDK.
Original file line number Diff line number Diff line change 11# See https://pub.dev/packages/mono_repo for details
2- dart :
3- # The minimum version should be kept in sync with the
4- # minimum SDK version defined in the webdev pubspec.
5- # This ensures we do not accidentally break users upon
6- # release of webdev.
7- - dev
8-
92stages :
103 - analyzer_and_format :
114 - group :
125 - format
136 - analyze : --fatal-infos .
147 - test : test/build/ensure_build_test.dart
158 dart : dev
9+ - group :
10+ - analyze : .
11+ - test : test/build/min_sdk_test.dart --run-skipped
12+ dart : stable
1613 - unit_test :
1714 - group :
1815 - command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
1916 - test : -j 1
17+ dart :
18+ - dev
19+ - stable
20+ - test : -j 1
21+ os : windows
22+ dart :
23+ - dev
24+ - stable
25+ - beta_cron :
26+ - analyze : .
27+ dart : beta
28+ - group :
29+ - command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
30+ - test : -j 1
31+ dart : beta
2032 - test : -j 1
2133 os : windows
34+ dart : beta
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ // @dart = 2.9
6+
7+ @TestOn ('vm' )
8+ @Skip ('Intended to run in analyze stage on stable SDK only, see mono_pkg.yaml' )
9+ import 'dart:io' ;
10+
11+ import 'package:pub_semver/pub_semver.dart' ;
12+ import 'package:pubspec_parse/pubspec_parse.dart' ;
13+ import 'package:test/test.dart' ;
14+
15+ void main () {
16+ test ('webdev pubspec has the stable as min SDK constraint' , () {
17+ var pubspec = Pubspec .parse (File ('pubspec.yaml' ).readAsStringSync ());
18+ var sdkVersion = Version .parse (Platform .version.split (' ' )[0 ]);
19+ sdkVersion = Version (sdkVersion.major, sdkVersion.minor, 0 );
20+
21+ var sdkConstraint = VersionConstraint .compatibleWith (sdkVersion);
22+ var pubspecSdkConstraint = pubspec.environment['sdk' ];
23+ expect (sdkConstraint.allowsAll (pubspecSdkConstraint), true ,
24+ reason:
25+ 'Min sdk constraint is outdated. Please update SDK constraint in '
26+ 'pubspec to allow latest stable and backwards compatible versions.'
27+ '\n Current stable: $sdkVersion , '
28+ '\n Webdev pubspec constraint: $pubspecSdkConstraint ' );
29+ });
30+ }
You can’t perform that action at this time.
0 commit comments