Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PR checks #7

Merged
merged 8 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI for PRs

on:
pull_request:
paths-ignore:
- "**.md"
branches:
- main

jobs:
ci_checks:
name: CI Checks
runs-on: ubuntu-latest

strategy:
matrix:
# Check the library against the most recent version and the previous minor version
flutter-version: [3.27.1, 3.24.5]
package:
- packages/yx_scope
- packages/yx_scope_flutter
- packages/yx_scope_linter

defaults:
run:
working-directory: ${{ matrix.package }}
shell: bash

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: Install dependencies
run: flutter pub get

- name: Check formatting
run: dart format --set-exit-if-changed .

- name: Run linter
run: flutter analyze

- name: Run tests
if: matrix.package != 'packages/yx_scope_linter'
run: flutter test
8 changes: 0 additions & 8 deletions packages/yx_scope_flutter/example/lib/di/utils/listeners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ class DIListener implements ScopeListener, DepListener, AsyncDepListener {
) =>
_log('[$scope] -> onScopeDisposeDepFailed', exception, stackTrace);

@override
void onDepRegistered(ScopeId scope, DepId dep) =>
_log('[$scope.$dep] -> onDepRegistered');

@override
void onDepUnregistered(ScopeId scope, DepId dep) =>
_log('[$scope.$dep] -> onDepUnregistered');

@override
void onValueStartCreate(ScopeId scope, DepId dep) =>
_log('[$scope.$dep] -> onValueStartCreate');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ abstract class MapInitializer {

Future<void> dropMap();
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

abstract class OnlineOrderStateHolder {
bool get isOnline;
Stream<bool> get isOnlineStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class AppRouterDelegate extends RouterDelegate<AppState>
return Navigator(
key: navigatorKey,
pages: pages,
// TODO: migrate to the new API
// ignore: deprecated_member_use
onPopPage: (route, result) {
if (!route.didPop(result)) {
return false;
Expand Down
3 changes: 1 addition & 2 deletions packages/yx_scope_flutter/example/lib/ui/map/map_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class _MapPageState extends State<MapPage> {
body: Column(
children: [
const Center(
child:
Text('Tap a street to select points for navigation'),
child: Text('Tap a street to select points for navigation'),
),
Expanded(child: MapWidget(onMapCreated: _onMapCreated)),
],
Expand Down
Loading