Skip to content

Commit 3a33bee

Browse files
ci: update ci setup
1 parent 1334281 commit 3a33bee

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/workflows/base.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1 # Use shallow clone for faster checkout
2022

2123
- name: Check broken links
2224
uses: JustinBeckwith/linkinator-action@v1
@@ -29,10 +31,19 @@ jobs:
2931
distribution: 'zulu'
3032
java-version: '11'
3133

34+
- name: Get Flutter version by FVM
35+
uses: kuhnroyal/flutter-fvm-config-action@v2
36+
id: fvm-config-action
37+
with:
38+
path: ".fvmrc"
39+
3240
- name: Flutter action
3341
uses: subosito/flutter-action@v2
3442
with:
35-
channel: "stable"
43+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
44+
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
45+
architecture: x64
46+
cache: true
3647

3748
- name: Install dependencies
3849
run: flutter pub get
@@ -41,9 +52,11 @@ jobs:
4152
- name: Analyze static code
4253
run: flutter analyze
4354
- name: Run tests
44-
run: flutter test --coverage
55+
run: flutter test --no-pub --coverage
4556
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@v3
57+
uses: codecov/codecov-action@v4
58+
env:
59+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4760
with:
4861
files: coverage/lcov.info
4962
name: form_builder_extra_fields
@@ -65,10 +78,22 @@ jobs:
6578
runs-on: ubuntu-latest
6679
steps:
6780
- uses: actions/checkout@v4
81+
with:
82+
fetch-depth: 1 # Use shallow clone for faster checkout
6883
- uses: dart-lang/setup-dart@v1
69-
- name: Flutter action
84+
85+
- name: Get Flutter version by FVM
86+
uses: kuhnroyal/flutter-fvm-config-action@v2
87+
id: fvm-config-action
88+
with:
89+
path: ".fvmrc"
90+
91+
- name: Set up Flutter
7092
uses: subosito/flutter-action@v2
7193
with:
72-
channel: "stable"
94+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
95+
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
96+
architecture: x64
97+
cache: true
7398
- name: Publish package
7499
run: dart pub publish -v -f

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# The .vscode folder contains launch configuration and tasks you configure in
2020
# VS Code which you may wish to be included in version control, so this line
2121
# is commented out by default.
22-
#.vscode/
22+
.vscode/
2323

2424
# Flutter/Dart/Pub related
2525
**/doc/api/

0 commit comments

Comments
 (0)