Skip to content

Commit 0cd5d78

Browse files
Merge pull request #85 from Workiva/use_gha-dart-oss
use gha-dart-oss
2 parents af8b10b + b77bf4f commit 0cd5d78

File tree

3 files changed

+73
-54
lines changed

3 files changed

+73
-54
lines changed

.github/workflows/ci.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'test_consume_*'
8+
pull_request:
9+
branches:
10+
- '**'
11+
12+
jobs:
13+
checks:
14+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
15+
with:
16+
format-check: false
17+
18+
build:
19+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
20+
21+
format:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: dart-lang/setup-dart@v1
26+
with:
27+
sdk: 2.19.6
28+
29+
- name: Check formatting
30+
run: dart format . -l 120 --set-exit-if-changed
31+
32+
test-unit:
33+
runs-on: ubuntu-latest
34+
name: unit tests (${{ matrix.release-mode && 'release' || 'dev' }})
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
release-mode: [true, false]
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: dart-lang/setup-dart@v1
42+
with:
43+
sdk: 2.19.6
44+
45+
- name: Install dependencies
46+
run: dart pub get
47+
timeout-minutes: 2
48+
49+
- name: Run tests
50+
timeout-minutes: 10
51+
run: |
52+
args=()
53+
if [[ "${{ matrix.release-mode }}" == "true" ]]; then
54+
args+=(--release)
55+
fi
56+
57+
dart run build_runner test "${args[@]}" -- -P concurrent-tests
58+
dart run build_runner test "${args[@]}" -- -P non-concurrent-tests

.github/workflows/dart_ci.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/publish.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
pull-requests: write
12+
13+
jobs:
14+
publish:
15+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]

0 commit comments

Comments
 (0)