Skip to content

Commit

Permalink
CI process (#68)
Browse files Browse the repository at this point in the history
Implement automated CI process
  • Loading branch information
fbenevides authored Aug 23, 2022
1 parent 68006e7 commit 186d02d
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 3 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on:
pull_request:
branches: [ master ]

jobs:
analyze:
runs-on: ubuntu-latest
name: 'analyze'
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.5'
- run: |
flutter pub get
flutter analyze
build-android:
runs-on: ubuntu-latest
needs: analyze
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.5'
- name: build apk
run: |
cd example
flutter pub get
flutter build apk
flutter build appbundle
build-ios:
runs-on: macos-latest
needs: analyze
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- name: build ios
run: |
cd example
flutter pub get
flutter build ios --release --no-codesign
build-web:
runs-on: ubuntu-latest
needs: analyze
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: build web
run: |
cd example
flutter pub get
flutter build web
16 changes: 16 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@ include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

analyzer:
exclude: [lib/pusher-js, example/**]

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
2 changes: 0 additions & 2 deletions lib/pusher_channels_flutter_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
library pusher_channels_flutter;

import 'dart:async';
import 'dart:convert';
import 'package:js/js.dart';
import 'package:js/js_util.dart' as js_util;
// In order to *not* need this ignore, consider extracting the 'web' version
Expand Down Expand Up @@ -128,7 +127,6 @@ class PusherChannelsFlutterWeb {
final Map<String, dynamic> data = msg['data'] ?? {};
String? userId = data['user_id'];
final Map<String, dynamic>? userInfo = data['user_info'];
print('onMessage: ${jsonEncode(msg)}');

if (event == 'pusher_internal:subscription_error') {
methodChannel!.invokeMethod(
Expand Down
1 change: 0 additions & 1 deletion test/pusher_channels_flutter_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pusher_channels_flutter/pusher_channels_flutter.dart';

void main() {
const MethodChannel channel = MethodChannel('pusher_channels_flutter');
Expand Down

0 comments on commit 186d02d

Please sign in to comment.