-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (60 loc) · 1.71 KB
/
check_pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Check PR
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
FLUTTER_VERSION: '3.24.0'
jobs:
# The preparation job is required to populate the FLUTTER_VERSION value as output for the tests jobs.
preparation:
name: Prepare environment vars
runs-on: ubuntu-22.04
outputs:
FLUTTER_VERSION: ${{ env.FLUTTER_VERSION }}
steps:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: ${{ env.FLUTTER_VERSION }}
test_flutter:
name: Flutter tests
needs: [ preparation ]
uses: ./.github/workflows/flutter_tests.yml
with:
flutter-version: ${{ needs.preparation.outputs.FLUTTER_VERSION }}
test_android:
name: Android tests
needs: [ preparation ]
uses: ./.github/workflows/android_tests.yml
with:
flutter-version: ${{ needs.preparation.outputs.FLUTTER_VERSION }}
test_ios:
name: iOS tests
needs: [ preparation ]
uses: ./.github/workflows/ios_tests.yml
with:
flutter-version: ${{ needs.preparation.outputs.FLUTTER_VERSION }}
sonar_cloud:
name: Sonar cloud
needs: [ test_android, test_ios ]
uses: ./.github/workflows/sonar_cloud.yml
with:
flutter-version: ${{ needs.preparation.outputs.FLUTTER_VERSION }}
secrets: inherit
clean_up:
name: Clean up
runs-on: ubuntu-22.04
continue-on-error: true
needs: [ sonar_cloud ]
steps:
- uses: actions/checkout@v4
- name: Clear cache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh cache delete android-reports
gh cache delete ios-reports