Skip to content

Commit

Permalink
add a "dart test" test (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 committed Jul 26, 2021
1 parent fa07b23 commit e431f4b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/dart.yml
Expand Up @@ -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
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
example/.packages
example/pubspec.lock
example/.dart_tool/
6 changes: 6 additions & 0 deletions example/pubspec.yaml
@@ -0,0 +1,6 @@
name: example
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
dev_dependencies:
test: any
11 changes: 11 additions & 0 deletions 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);
});
}

0 comments on commit e431f4b

Please sign in to comment.