-
-
Notifications
You must be signed in to change notification settings - Fork 280
52 lines (40 loc) · 1.32 KB
/
presubmit.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
name: SmoothApp Pre-Submit Tests
on:
pull_request:
jobs:
build:
name: 'Analyze and test'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v3
# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
#channel: stable
cache: true
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}
- run: flutter --version
# Get dependencies.
- name: Get dependencies
run: ci/pub_upgrade.sh
# Check for formatting issues
- name: Check for formatting issues (run "dart format . ")
run: dart format --set-exit-if-changed .
# analyze Dart for errors
- name: Analyze code
run: flutter analyze --fatal-infos --fatal-warnings .
# Run tests
- name: Run Tests with coverage
run: ci/testing.sh
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false