Skip to content

Commit 839bc16

Browse files
committed
use flutter action with cache
1 parent 83f5885 commit 839bc16

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,26 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
container:
15-
image: ghcr.io/cirruslabs/flutter:3.35.5
1614

1715
steps:
1816
- name: Checkout OneSignal-Flutter-SDK
1917
uses: actions/checkout@v5
2018

19+
- name: Set up Flutter
20+
uses: subosito/flutter-action@v2
21+
with:
22+
channel: stable
23+
flutter-version: 3.35.5
24+
cache: true
25+
2126
- name: Install
2227
run: flutter pub get
2328

2429
- name: Static Analysis
2530
run: flutter analyze
2631

27-
- name: Activate rps
28-
run: dart pub global activate rps
29-
3032
- name: Ensure the Dart code is formatted correctly
3133
run: dart format --set-exit-if-changed --output=none .
3234

3335
- name: Run Flutter unit tests
34-
run: rps test
36+
run: dart run rps test

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 5.3.4
44
homepage: https://github.com/OneSignal/OneSignal-Flutter-SDK
55

66
scripts:
7-
test: flutter test --coverage && dlcov -c 80 --log=0 --include-untested-files=true
7+
test: flutter test --coverage && dart run dlcov -c 80 --log=0 --include-untested-files=true
88

99
flutter:
1010
plugin:
@@ -27,5 +27,5 @@ dev_dependencies:
2727
rps: ^0.9.1
2828

2929
environment:
30-
sdk: ">=2.12.0 <3.0.0"
31-
flutter: ">=1.10.0"
30+
sdk: ">=3.0.0 <4.0.0"
31+
flutter: ">=3.0.0"

test/mock_channel.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ class OneSignalMockChannelController {
125125
case "OneSignal#removeExternalUserId":
126126
state.externalId = null;
127127
return {"success": true};
128-
case "OneSignal#setLanguage":
129-
state.language =
130-
(call.arguments as Map<dynamic, dynamic>)['language'] as String?;
131-
return {"success": true};
132128
case "OneSignal#requestPermission":
133129
// Location requestPermission (no arguments)
134130
if (call.arguments == null) {
@@ -204,9 +200,6 @@ class OneSignalMockChannelController {
204200
break;
205201
case "OneSignal#arePaused":
206202
return state.inAppMessagesPaused ?? false;
207-
case "OneSignal#lifecycleInit":
208-
state.lifecycleInitCalled = true;
209-
break;
210203
case "OneSignal#displayNotification":
211204
// This is called on OneSignal#notifications channel
212205
state.displayedNotificationId = (call.arguments

0 commit comments

Comments
 (0)