Skip to content

Commit 3387a2e

Browse files
committed
Added CI (WIP)
1 parent 5ba680e commit 3387a2e

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

‎.github/workflows/dart.yaml‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "Dart"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- 'releases/**'
9+
paths:
10+
- '**.dart'
11+
- './*.yaml'
12+
- .github/workflows/dart.yaml
13+
- .github/actions/flutter-setup/**
14+
15+
jobs:
16+
install:
17+
name: "install"
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v5
21+
- uses: dart-lang/setup-dart@v1
22+
with:
23+
sdk: stable
24+
25+
format:
26+
name: "format"
27+
runs-on: ubuntu-latest
28+
needs: install
29+
30+
steps:
31+
- uses: actions/checkout@v5
32+
- uses: dart-lang/setup-dart@v1
33+
with:
34+
sdk: stable
35+
36+
- name: "dart format"
37+
run: |
38+
echo "Checking Dart formatting...\nFiles displayed below:"
39+
dart format -o none --set-exit-if-changed ./**/*.dart
40+
echo "No formatting issues found."
41+
42+
analyze:
43+
name: "analyze"
44+
runs-on: ubuntu-latest
45+
needs: install
46+
47+
steps:
48+
- uses: actions/checkout@v5
49+
- uses: dart-lang/setup-dart@v1
50+
with:
51+
sdk: stable
52+
53+
- name: "Get dependencies"
54+
run: dart pub get
55+
56+
- name: Run analysis
57+
run: dart analyze --fatal-warnings
58+
59+
test:
60+
name: "test"
61+
runs-on: ubuntu-latest
62+
needs: install
63+
64+
steps:
65+
- uses: actions/checkout@v5
66+
- uses: dart-lang/setup-dart@v1
67+
with:
68+
sdk: stable
69+
70+
- name: "Get dependencies"
71+
run: dart pub get
72+
73+
- name: Run tests
74+
run: dart test --reporter=expanded

0 commit comments

Comments
 (0)