This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (54 loc) · 1.8 KB
/
ci.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
67
68
name: Analyze, format and test
on:
# Trigger the workflow on pushes to the main and feature branches as well as PRs targeting them.
push:
branches: [main, feature/**]
pull_request:
branches: [main, feature/**]
# Allows us to run the workflow manually from the Actions tab
workflow_dispatch:
env:
flutter_version: 3.13.6
jobs:
check-licenses:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
- run: dart pub get
- name: Check licenses
run: dart run scripts/check_license.dart
analyze-format:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
- name: Analyze (lint)
run: flutter analyze
- name: Check format
run: dart format --output=none --set-exit-if-changed . -l 150
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
- name: Test
run: flutter test