Skip to content

Commit

Permalink
chore: upgrade melos (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaugold authored Dec 11, 2023
1 parent cc39d14 commit 15bca6b
Show file tree
Hide file tree
Showing 5 changed files with 328 additions and 23 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: CI

env:
FLUTTER_VERSION: 3.3.9
MELOS_VERSION: 2.8.0

on:
push:
branches:
Expand All @@ -12,19 +8,16 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true

- name: Install Melos
run: flutter pub global activate melos $MELOS_VERSION
run: flutter pub global activate melos

- name: Bootstrap packages
run: melos bootstrap
Expand Down
12 changes: 4 additions & 8 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@ packages:
ide:
intellij: false

command:
bootstrap:
usePubspecOverrides: true

scripts:
format:
run: flutter format .
run: dart format .

format:check:
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed . --output=none

analyze:
run: flutter analyze

test:
exec: flutter test
select-package:
dir-exists:
packageFilters:
dirExists:
- 'test'
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ void main() {
final eventChannel = EventChannel(channelName);
final methodChannel = MethodChannel(channelName);

test('startSendingUpdates', () async {
testWidgets('startSendingUpdates', (tester) async {
var channelHasStartedListening = false;
methodChannel.setMockMethodCallHandler((call) async {
tester.binding.defaultBinaryMessenger
.setMockMethodCallHandler(methodChannel, (call) async {
channelHasStartedListening = call.method == 'listen';
return null;
});

final firstEvent =
Expand All @@ -24,7 +26,7 @@ void main() {

var firstResult = {'key': 'value'};

unawaited(eventChannel.binaryMessenger.handlePlatformMessage(
unawaited(tester.binding.defaultBinaryMessenger.handlePlatformMessage(
channelName,
eventChannel.codec.encodeSuccessEnvelope(firstResult),
(data) {},
Expand Down
Loading

0 comments on commit 15bca6b

Please sign in to comment.