diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 9692b91..27c5fe7 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -89,3 +89,28 @@ jobs: stagehand console-simple dart pub get dart run + + test_test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + # Test latest stable, beta, dev channels + sdk: [stable, beta, dev] + flavor: [release] + steps: + - uses: actions/checkout@v2 + - uses: ./ + with: + sdk: ${{ matrix.sdk }} + + - id: dart_pub_upgrade + name: Dart pub upgrade + working-directory: example + run: dart pub upgrade + + - name: Dart test + if: "always() && steps.dart_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dart test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bb25bcf --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +example/.packages +example/pubspec.lock +example/.dart_tool/ diff --git a/example/pubspec.yaml b/example/pubspec.yaml new file mode 100644 index 0000000..0edb667 --- /dev/null +++ b/example/pubspec.yaml @@ -0,0 +1,6 @@ +name: example +publish_to: none +environment: + sdk: '>=2.12.0 <3.0.0' +dev_dependencies: + test: any diff --git a/example/test/example_test.dart b/example/test/example_test.dart new file mode 100644 index 0000000..ef3c3e7 --- /dev/null +++ b/example/test/example_test.dart @@ -0,0 +1,11 @@ +// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:test/test.dart'; + +void main() { + test('true is true', () { + expect(true, isTrue); + }); +}