-
-
Notifications
You must be signed in to change notification settings - Fork 455
63 lines (51 loc) · 1.56 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (51 loc) · 1.56 KB
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
name: Tests
on:
push:
paths:
- 'lib/**'
- '!lib/l10n/**'
- 'test/**'
- 'pubspec.yaml'
branches:
- main
pull_request:
paths:
- 'lib/**'
- '!lib/l10n/**'
- 'test/**'
- 'pubspec.yaml'
branches:
- main
# Declare default permissions as read only.
permissions: read-all
jobs:
unit-test:
name: Unit tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v7.0.0
- name: 🐦 Install flutter
uses: subosito/flutter-action@v2.23.0
with:
cache: true
flutter-version-file: pubspec.yaml
- name: Install requirements for sqflite_common_ffi package
run: sudo apt-get -y install libsqlite3-0 libsqlite3-dev
- name: Install dependencies
run: flutter pub get
- name: Code generation
run: dart run build_runner build
- name: Verify formatting
run: |
dart format --output=none --set-exit-if-changed $(find lib/src -name "*.dart" -not \( -name "*.*freezed.dart" -o -name "*.*g.dart" -o -name "*lichess_icons.dart" \) )
dart format --output=none --set-exit-if-changed $(find test -name "*.dart" -not \( -name "*.*freezed.dart" -o -name "*.*g.dart" \) )
# run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: flutter analyze
# - name: Run riverpod lint
# run: dart run custom_lint
- name: Run unit tests
run: flutter test