File tree 10 files changed +591
-35
lines changed
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 3
3
4
4
tags :
5
5
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:
6
6
- analyze : --fatal-infos .
7
7
- test : test/build/ensure_version_test.dart
8
8
dart : dev
9
+ - group :
10
+ - analyze : .
11
+ - test : test/build/min_sdk_test.dart --run-skipped
12
+ dart : stable
9
13
- unit_test :
10
14
- group :
11
15
- command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
12
16
- test :
13
- dart : dev
17
+ dart :
18
+ - dev
19
+ - stable
14
20
- test :
15
21
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:
9
9
dev_dependencies :
10
10
build_runner : ^2.0.0
11
11
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
3
3
github :
4
4
env :
5
5
DISPLAY : ' :99'
6
- cron : ' 0 0 * * 0'
6
+ cron : ' 0 0 * * 0' # "At 00:00 (UTC) on Sunday."
7
7
on_completion :
8
8
- name : " Notify failure"
9
9
runs-on : ubuntu-latest
@@ -16,6 +16,10 @@ github:
16
16
"${CHAT_WEBHOOK_URL}"
17
17
env:
18
18
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'
19
23
20
24
merge_stages :
21
25
- analyzer_and_format
Original file line number Diff line number Diff line change @@ -67,10 +67,14 @@ for PKG in ${PKGS}; do
67
67
echo
68
68
echo -e " \033[1mPKG: ${PKG} ; TASK: ${TASK} \033[22m"
69
69
case ${TASK} in
70
- analyze )
70
+ analyze_0 )
71
71
echo ' dart analyze --fatal-infos .'
72
72
dart analyze --fatal-infos . || EXIT_CODE=$?
73
73
;;
74
+ analyze_1)
75
+ echo ' dart analyze .'
76
+ dart analyze . || EXIT_CODE=$?
77
+ ;;
74
78
command)
75
79
echo ' Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &'
76
80
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & || EXIT_CODE=$?
@@ -84,17 +88,21 @@ for PKG in ${PKGS}; do
84
88
dart test test/build/ensure_version_test.dart || EXIT_CODE=$?
85
89
;;
86
90
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=$?
89
93
;;
90
94
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=$?
93
97
;;
94
98
test_3)
95
99
echo ' dart test -j 1'
96
100
dart test -j 1 || EXIT_CODE=$?
97
101
;;
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
+ ;;
98
106
* )
99
107
echo -e " \033[31mUnknown TASK '${TASK} ' - TERMINATING JOB\033[0m"
100
108
exit 64
Original file line number Diff line number Diff line change 1
1
retry : 3
2
2
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 1
1
# 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
-
9
2
stages :
10
3
- analyzer_and_format :
11
4
- group :
12
5
- format
13
6
- analyze : --fatal-infos .
14
7
- test : test/build/ensure_build_test.dart
15
8
dart : dev
9
+ - group :
10
+ - analyze : .
11
+ - test : test/build/min_sdk_test.dart --run-skipped
12
+ dart : stable
16
13
- unit_test :
17
14
- group :
18
15
- command : Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
19
16
- 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
20
32
- test : -j 1
21
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 ('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