-
Notifications
You must be signed in to change notification settings - Fork 24
66 lines (55 loc) · 1.6 KB
/
flutter-app-code-check.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
66
name: Flutter app code check
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- "**/.github/**"
- "**/.gitignore"
- "**/.vscode/**"
- "**/README.md"
- ".cspell/**"
- "Makefile"
- "mason.yaml"
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "**/.github/**"
- "**/.gitignore"
- "**/.vscode/**"
- "**/README.md"
- ".cspell/**"
- "Makefile"
- "mason.yaml"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Parse Flutter version
id: fvm-config
uses: kuhnroyal/flutter-fvm-config-action@v1
- name: Install Flutter
id: install-flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config.outputs.FLUTTER_CHANNEL }}
cache: true
- name: Prepare Melos
run: echo "MELOS_SDK_PATH=${{ steps.install-flutter.outputs.CACHE-PATH }}" >> "$GITHUB_ENV"
- name: Install Melos
uses: bluefireteam/melos-action@v2
- name: Analyze packages
run: melos run analyze --no-select
- name: Check for the existence of unformatted files
run: melos run format --no-select
- name: Run package tests
run: melos run test --no-select
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ~/coverage/lcov.info
fail_ci_if_error: false