mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
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@v3
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
- run: flutter doctor -v
|
|
|
|
- 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 -name "*.dart" -not \( -name "*.*freezed.dart" -o -name "*.*g.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
|
|
|