-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.35 KB
/
test.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
name: CI
on:
# Trigger the workflow on push or pull request,
# but push action is only for the feature branch
pull_request:
types: [ opened, synchronize, edited, reopened ]
push:
branches-ignore:
- develop
- 'release/**'
jobs:
lint_and_test:
name: Static code analyze & Unit test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'
- name: Get Flutter dependencies
run: flutter pub get
- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Check for any formatting issues in the code
run: dart format --set-exit-if-changed .
- name: Statically analyze the Dart code for any errors
run: flutter analyze .
- name: Run widget tests, unit tests
run: flutter test --machine --coverage
- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage/lcov.info
flags: unittests # optional
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: false
verbose: true