Skip to content

Commit bd2bb3a

Browse files
ci: use common jobs
1 parent 52cf16e commit bd2bb3a

File tree

1 file changed

+11
-57
lines changed

1 file changed

+11
-57
lines changed

.github/workflows/base.yaml

Lines changed: 11 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -11,68 +11,22 @@ 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-
- name: Checkout repository
20-
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 1 # Use shallow clone for faster checkout
23-
24-
- name: Check broken links
25-
uses: JustinBeckwith/linkinator-action@v1
26-
with:
27-
paths: "**/*.md"
28-
29-
- name: Setup Java
30-
uses: actions/setup-java@v4
31-
with:
32-
distribution: 'zulu'
33-
java-version: '11'
34-
35-
- name: Get Flutter version by FVM
36-
uses: kuhnroyal/flutter-fvm-config-action@v2
37-
id: fvm-config-action
38-
with:
39-
path: ".fvmrc"
40-
41-
- name: Flutter action
42-
uses: subosito/flutter-action@v2
43-
with:
44-
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
45-
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
46-
architecture: x64
47-
cache: true
48-
49-
- name: Install dependencies
50-
run: flutter pub get
51-
- name: Format code
52-
run: dart format --set-exit-if-changed .
53-
- name: Analyze static code
54-
run: flutter analyze
55-
- name: Run tests
56-
run: flutter test --no-pub --coverage
57-
- name: Check publish warnings
58-
run: dart pub publish --dry-run
59-
- name: Upload coverage to Codecov
60-
uses: codecov/codecov-action@v4
61-
env:
62-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63-
with:
64-
files: coverage/lcov.info
65-
name: form_builder_cupertino_fields
66-
- name: Build example
67-
run: |
68-
cd example
69-
flutter build appbundle --debug
70-
flutter build ios --debug --no-codesign
71-
flutter build web
21+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/minimal-quality.yaml@main
22+
with:
23+
codecov-name: 'form_builder_cupertino_fields'
24+
example:
25+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/build-examples.yaml@main
7226

7327
deployment:
7428
permissions:
7529
id-token: write
7630
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
7731
if: ${{ github.ref_type == 'tag' }}
78-
needs: build
32+
needs: [build, example]

0 commit comments

Comments
 (0)