|
1 |
| -name: Dart CI |
| 1 | +# This workflow uses actions that are not certified by GitHub. |
| 2 | +# They are provided by a third-party and are governed by |
| 3 | +# separate terms of service, privacy policy, and support |
| 4 | +# documentation. |
| 5 | + |
| 6 | +name: Dart |
2 | 7 |
|
3 | 8 | on:
|
4 | 9 | push:
|
5 |
| - branches: [ master ] |
| 10 | + branches: [ "master" ] |
6 | 11 | pull_request:
|
7 |
| - branches: [ master ] |
| 12 | + branches: [ "master" ] |
8 | 13 |
|
9 | 14 | jobs:
|
10 | 15 | build:
|
11 |
| - |
12 | 16 | runs-on: ubuntu-latest
|
13 | 17 |
|
14 |
| - container: |
15 |
| - image: google/dart:2.12 |
16 |
| - |
17 | 18 | steps:
|
18 |
| - - uses: actions/checkout@v2 |
19 |
| - - name: Install dependencies |
20 |
| - run: pub get |
21 |
| - - name: Format code |
22 |
| - run: dartfmt -n --set-exit-if-changed . |
23 |
| - - name: Static analyze project |
24 |
| - run: dartanalyzer --fatal-infos --fatal-warnings . |
25 |
| - - name: Run tests |
26 |
| - run: pub run test |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + |
| 21 | + # Note: This workflow uses the latest stable version of the Dart SDK. |
| 22 | + # You can specify other versions if desired, see documentation here: |
| 23 | + # https://github.com/dart-lang/setup-dart/blob/main/README.md |
| 24 | + # - uses: dart-lang/setup-dart@v1 |
| 25 | + - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 |
| 26 | + |
| 27 | + - name: Install dependencies |
| 28 | + run: dart pub get |
| 29 | + |
| 30 | + # Uncomment this step to verify the use of 'dart format' on each commit. |
| 31 | + - name: Verify formatting |
| 32 | + run: dart format --output=none --set-exit-if-changed . |
| 33 | + |
| 34 | + # Consider passing '--fatal-infos' for slightly stricter analysis. |
| 35 | + - name: Analyze project source |
| 36 | + run: dart analyze --fatal-infos |
| 37 | + |
| 38 | + # Your project will need to have tests in test/ and a dependency on |
| 39 | + # package:test for this step to succeed. Note that Flutter projects will |
| 40 | + # want to change this to 'flutter test'. |
| 41 | + - name: Run tests |
| 42 | + run: dart test |
0 commit comments