From bc64335f5b61f38439a2f854b6abcfbe2ee27ad6 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 3 Apr 2018 07:57:30 -0700 Subject: [PATCH 1/2] Add appveyor (Windows) CI --- appveyor.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..e0baced33 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,22 @@ +branches: + only: + - master + +version: '1.0.{build}' + +install: + - ps: wget https://storage.googleapis.com/dart-archive/channels/dev/release/latest/sdk/dartsdk-windows-x64-release.zip -OutFile dart-sdk.zip + - cmd: echo "Unzipping dart-sdk..." + - cmd: 7z x dart-sdk.zip -o"C:\tools" -y > nul + - set PATH=%PATH%;C:\tools\dart-sdk\bin + - set PATH=%PATH%;%APPDATA%\Pub\Cache\bin + - cd webdev + - pub get && exit 0 + +build: off + +test_script: + - pub run test -j 1 + +cache: + - C:\Users\appveyor\AppData\Roaming\Pub\Cache From bb44773d7b9d09529b93968e7b57cc4c06726f4c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 3 Apr 2018 08:01:51 -0700 Subject: [PATCH 2/2] Fixes to run on Windows --- webdev/CHANGELOG.md | 4 ++++ webdev/lib/src/pubspec.dart | 2 +- webdev/pubspec.yaml | 2 +- webdev/test/integration_test.dart | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index d607bad34..d048f9b39 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.3 + +- Now runs on Windows. + ## 0.1.2 - Remove check for `build_web_compilers`. Allows general support for diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index 00b57881c..1705b100e 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -38,7 +38,7 @@ class PackageExceptionDetails { } Future _runPubDeps() async { - var result = Process.runSync('pub', ['deps']); + var result = Process.runSync('pub', ['deps'], runInShell: true); if (result.exitCode == 65 || result.exitCode == 66) { throw new PackageException._( diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index 7394456c5..fcec1f37f 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,5 +1,5 @@ name: webdev -version: 0.1.3-dev +version: 0.1.3 author: Dart Team homepage: https://github.com/dart-lang/webdev description: >- diff --git a/webdev/test/integration_test.dart b/webdev/test/integration_test.dart index 336bb43ca..ec9221711 100644 --- a/webdev/test/integration_test.dart +++ b/webdev/test/integration_test.dart @@ -10,7 +10,7 @@ import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; import 'package:test_process/test_process.dart'; -final _webdevBin = p.absolute('bin/webdev.dart'); +final _webdevBin = p.absolute(p.join('bin', 'webdev.dart')); /// The path to the root directory of the SDK. final String _sdkDir = (() { @@ -219,7 +219,9 @@ dependencies: test('should succeed with valid configuration', () async { var exampleDirectory = p.absolute(p.join(p.current, '..', 'example')); var process = await TestProcess.start(_pubPath, ['get'], - workingDirectory: exampleDirectory, environment: _getPubEnvironment()); + workingDirectory: exampleDirectory, + environment: _getPubEnvironment(), + runInShell: true); await process.shouldExit(0);