-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 884 Bytes
/
ci.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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-test:
name: Unit tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
# Set up Flutter.
- name: Clone Flutter repository with master channel
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter doctor -v
# Checkout code and get packages.
- name: Checkout code
uses: actions/checkout@v4
- run: flutter --version
- run: flutter pub get
# Analyze, check formatting, and run unit tests.
- run: flutter analyze
- name: Ensure the Dart code is formatted correctly
run: dart format --set-exit-if-changed .
- name: Run Flutter unit tests
run: flutter test