Skip to content

Commit cbf530e

Browse files
ci: refactor pipeline to use common jobs
1 parent 2e22ea7 commit cbf530e

File tree

1 file changed

+9
-56
lines changed

1 file changed

+9
-56
lines changed

.github/workflows/base.yaml

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,67 +11,20 @@ on:
1111

1212
workflow_dispatch:
1313

14+
# This ensures that previous jobs for the PR are canceled when PR is updated
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1419
jobs:
1520
build:
16-
runs-on: macos-latest
17-
18-
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 1 # Use shallow clone for faster checkout
22-
23-
- name: Check broken links
24-
uses: JustinBeckwith/linkinator-action@v1
25-
with:
26-
paths: "**/*.md"
27-
28-
- name: Setup Java
29-
uses: actions/setup-java@v4
30-
with:
31-
distribution: 'zulu'
32-
java-version: '11'
33-
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-
40-
- name: Flutter action
41-
uses: subosito/flutter-action@v2
42-
with:
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
47-
48-
- name: Install dependencies
49-
run: flutter pub get
50-
- name: Format code
51-
run: dart format --set-exit-if-changed .
52-
- name: Analyze static code
53-
run: flutter analyze
54-
# - name: Run tests
55-
# run: flutter test
56-
- name: Check publish warnings
57-
run: dart pub publish --dry-run
58-
- name: Build example
59-
run: |
60-
cd example
61-
flutter build appbundle --debug
62-
flutter build ios --debug --no-codesign
63-
flutter build web
64-
65-
# - name: Upload coverage to Codecov
66-
# uses: codecov/codecov-action@v3
67-
# with:
68-
# files: coverage/lcov.info
69-
# flags: unittests
70-
# name: form_builder_image_picker
21+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/minimal-quality.yaml@main
22+
example:
23+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/build-examples.yaml@main
7124

7225
deployment:
7326
permissions:
7427
id-token: write
7528
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
7629
if: ${{ github.ref_type == 'tag' }}
77-
needs: build
30+
needs: [build, example]

0 commit comments

Comments
 (0)