-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.31 KB
/
analyze_and_test.yaml
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
name: Analyze and test code
on:
pull_request:
push:
branches:
# Run test, analyze and coverage generation also when the PR gets merged into develop
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze-and-test:
# The type of machine to run the job on. [windows,macos, ubuntu , self-hosted]
runs-on: ubuntu-latest
# Sequence of tasks called
steps:
# The branch or tag ref that triggered the workflow will be checked out.
- uses: actions/checkout@v3
# Setup a flutter environment.
# https://github.com/marketplace/actions/flutter-action
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
# Install melos
- name: Install global melos dependency
run: dart pub global activate melos
# Resolve dependencies
- name: Resolve dependencies
timeout-minutes: 2
run: melos run get
# Analysis code
- name: Check the format of the code
run: melos run format
- name: Analyze the code
run: melos run analyze
# Run flutter widgets tests and unit tests
- name: Test the code
run: melos run test --no-select