|
1 | | -name: Dart CI |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - 'master' |
7 | | - - 'test_consume_*' |
8 | 4 | pull_request: |
| 5 | + push: |
9 | 6 | branches: |
| 7 | + - master |
| 8 | + tags: |
10 | 9 | - '**' |
11 | 10 |
|
12 | 11 | jobs: |
13 | | - test: |
14 | | - runs-on: ubuntu-latest |
15 | | - strategy: |
16 | | - matrix: |
17 | | - sdk: [ 2.19.6, stable, beta ] |
18 | | - steps: |
19 | | - - uses: actions/checkout@v4 |
20 | | - - uses: dart-lang/setup-dart@v1 |
21 | | - with: |
22 | | - sdk: ${{ matrix.sdk }} |
23 | | - - name: Install dependencies |
24 | | - run: dart pub get |
25 | | - - name: Validate dependencies |
26 | | - run: dart run dependency_validator |
27 | | - - name: Check formatting |
28 | | - run: dart format --output=none --set-exit-if-changed . |
29 | | - if: ${{ matrix.sdk == 'stable' }} |
30 | | - - name: Analyze project source |
31 | | - run: dart analyze |
32 | | - - name: Run tests |
33 | | - run: dart test |
34 | | - - uses: anchore/sbom-action@v0 |
35 | | - with: |
36 | | - path: ./ |
37 | | - format: cyclonedx-json |
| 12 | + # Runs analysis, formatting, and dependency validation against the dart source. |
| 13 | + checks: |
| 14 | + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.14 |
| 15 | + |
| 16 | + # Generates an SBOM and uploads it via anchore/sbom-action. |
| 17 | + build: |
| 18 | + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.14 |
38 | 19 |
|
39 | | - # If new major versions of analyzer are released in the future and we want to |
40 | | - # be compatible with multiple majors, use this workflow to validate. |
41 | | - # NOTE: we're currently compatible with analyzer v5 and v6, but v5 is only |
42 | | - # compatible with Dart 2 and v6 is only compatible with Dart 3, so we are |
43 | | - # already testing both major versions above. Use this workflow below if we |
44 | | - # need to test compatibility across multiple analyzer majors all on Dart 3. |
45 | | - # validate_analyzer: |
46 | | - # runs-on: ubuntu-latest |
47 | | - # strategy: |
48 | | - # fail-fast: false |
49 | | - # matrix: |
50 | | - # sdk: [ stable ] |
51 | | - # analyzer: |
52 | | - # - ^6.0.0 |
53 | | - # - ^7.0.0 |
54 | | - # steps: |
55 | | - # - uses: actions/checkout@v4 |
56 | | - # - uses: dart-lang/setup-dart@v1 |
57 | | - # with: |
58 | | - # sdk: ${{ matrix.sdk }} |
59 | | - # - name: Update analyzer constraint to ${{ matrix.analyzer }} |
60 | | - # run: dart pub remove analyzer && dart pub add analyzer:${{ matrix.analyzer }} && git diff pubspec.yaml |
61 | | - # - name: Analyze project source |
62 | | - # run: dart analyze |
63 | | - # - name: Run tests |
64 | | - # run: dart test |
| 20 | + # Runs unit tests in dev mode. |
| 21 | + unit-tests: |
| 22 | + uses: Workiva/gha-dart-oss/.github/workflows/test-unit.yaml@v0.1.14 |
0 commit comments