Skip to content

Commit 1511f80

Browse files
committed
Modularize GitHub CI
Separate format and analysis, no test nor quality in publish
1 parent 87ceb43 commit 1511f80

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_run:
55
workflows:
66
- "Code Quality"
7-
- "Flutter Integration Test"
7+
- "Run Tests"
88
types:
99
- completed
1010

@@ -17,17 +17,13 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20-
- name: Set up Flutter
20+
- name: Setup Flutter
2121
uses: subosito/flutter-action@v2
2222
with:
2323
channel: stable
2424
flutter-version-file: pubspec.yaml
2525
- name: Install dependencies
2626
run: flutter pub get
27-
- name: Analyze code
28-
run: flutter analyze
29-
- name: Format code
30-
run: dart format --output=none --set-exit-if-changed .
3127
- name: Update version
3228
run: |
3329
LATEST_TAG=$(git describe --tags --abbrev=0)
@@ -38,8 +34,6 @@ jobs:
3834
git add pubspec.yaml
3935
git commit -m "chore: update version to $VERSION"
4036
git push
41-
- name: Run tests
42-
run: flutter test
4337
- name: Publish plugin
4438
run: flutter pub publish --force
4539
env:

.github/workflows/quality.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ on:
44
push:
55

66
jobs:
7-
integration:
7+
analyze:
8+
name: Static Analysis
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v4
11-
- name: Set up Flutter
12+
- name: Setup Flutter
1213
uses: subosito/flutter-action@v2
1314
with:
1415
channel: stable
@@ -17,5 +18,12 @@ jobs:
1718
run: flutter pub get
1819
- name: Analyze code
1920
run: flutter analyze
21+
format:
22+
name: Code Formatting
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup dart
27+
uses: dart-lang/setup-dart@v1
2028
- name: Format code
2129
run: dart format --output=none --set-exit-if-changed .
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: Flutter Integration Test
1+
name: Tests
22

33
on:
44
push:
55

66
jobs:
77
integration:
8+
name: Integration Test
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v4
11-
- name: Set up Flutter
12+
- name: Setup Flutter
1213
uses: subosito/flutter-action@v2
1314
with:
1415
channel: stable
1516
flutter-version-file: pubspec.yaml
16-
- name: Flutter integration test
17+
- name: Flutter Integration Test
1718
working-directory: ./example
1819
run: flutter test integration_test

0 commit comments

Comments
 (0)