|
4 | 4 | push:
|
5 | 5 | branches: [main]
|
6 | 6 | tags:
|
7 |
| - - '[0-9]+.[0-9]+.[0-9]+*' |
| 7 | + - '[0-9]+.[0-9]+.[0-9]+' |
8 | 8 |
|
9 | 9 | pull_request:
|
10 | 10 | branches: [main]
|
11 | 11 |
|
12 | 12 | workflow_dispatch:
|
13 | 13 |
|
| 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 | + |
14 | 19 | jobs:
|
15 | 20 | 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 --coverage |
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 |
| 21 | + uses: flutter-form-builder-ecosystem/.github/.github/workflows/minimal-quality.yaml@main |
| 22 | + with: |
| 23 | + codecov-name: form_builder_phone_field |
| 24 | + example: |
| 25 | + uses: flutter-form-builder-ecosystem/.github/.github/workflows/build-examples.yaml@main |
63 | 26 |
|
64 |
| - - name: Upload coverage to Codecov |
65 |
| - uses: codecov/codecov-action@v4 |
66 |
| - env: |
67 |
| - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
68 |
| - with: |
69 |
| - files: coverage/lcov.info |
70 |
| - flags: unittests |
71 |
| - name: form_builder_phone_field |
72 | 27 |
|
73 | 28 | deployment:
|
74 | 29 | permissions:
|
75 | 30 | id-token: write
|
76 | 31 | uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
|
77 | 32 | if: ${{ github.ref_type == 'tag' }}
|
78 |
| - needs: build |
| 33 | + needs: [build, example] |
0 commit comments