-
Notifications
You must be signed in to change notification settings - Fork 34
54 lines (43 loc) · 1.36 KB
/
flutter-analyze.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
name: Flutter Analyze
on:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
analyze:
name: Analyze Flutter Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install jq
run: sudo apt-get install -y jq
- name: Read Flutter Version
id: flutter_version
run: |
if [ -f .fvmrc ]; then
FLUTTER_VERSION=$(cat .fvmrc | jq -r '.flutter')
echo "Flutter version detected: $FLUTTER_VERSION"
echo "flutter-version=$FLUTTER_VERSION" >> $GITHUB_ENV
else
echo ".fvmrc not found. Defaulting to latest Flutter version."
echo "flutter-version=stable" >> $GITHUB_ENV
fi
- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter-version }}
- name: Install Dependencies
run: flutter pub get
- name: Install Dependencies for Rust Builder Project
working-directory: rust_builder
run: flutter pub get
- name: Install Dependencies for Rust Builder Project
working-directory: rust_builder/cargokit/build_tool
run: flutter pub get
- name: Run Flutter Analyze
run: flutter analyze
- name: Fail on Errors
if: failure()
run: exit 1