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

new release #81

Merged
merged 8 commits into from
Mar 10, 2025
Merged
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
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Package

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'release')

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Setup Pub Credentials
shell: bash
env:
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
run: |
sh ./pub_login.sh

- name: Check Publish Warnings
run: |
sudo cat /$HOME/.config/dart/pub-credentials.json
flutter pub publish --dry-run

- name: Publish Package
run: |
yes | flutter pub publish
25 changes: 2 additions & 23 deletions .github/workflows/publish.yml → .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Run Test Cases And Publish Package
name: Run Test Cases

on: [pull_request]

@@ -35,26 +35,5 @@ jobs:
with:
api-level: 29
script: |
cd example/SampleProject && flutter test integration_test/test_conference.dart
cd example/SampleProject && flutter test integration_test/test_play.dart

# Uncomment and adjust for publishing your package
- name: Setup Pub Credentials
shell: bash
env:
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
PUB_DEV_PUBLISH_TOKEN_ENDPOINT: ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
PUB_DEV_PUBLISH_EXPIRATION: ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
run: |
sh ./pub_login.sh

- name: Check Publish Warnings
run: |
sudo cat /$HOME/.config/dart/pub-credentials.json
flutter pub publish --dry-run

- name: Publish Package
if: github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, 'release')
run: |
yes | flutter pub publish
cd example/SampleProject && flutter test integration_test/test_conference.dart
25 changes: 20 additions & 5 deletions example/SampleProject/integration_test/test_play.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart';
import 'package:integration_test/integration_test.dart';
import 'test_helper.dart';

@@ -24,11 +25,25 @@ void main() {

// Enter Room ID and tap OK.
await enterRoomId(tester, '24x7test');
await tester.pumpAndSettle(const Duration(seconds: 30));

// Verify the content of the SnackBar.
final callEndIcon = find.byIcon(Icons.call_end);
await tester.tap(callEndIcon);
await tester.pumpAndSettle();

const maxWaitTime = Duration(seconds: 120);
final stopwatch = Stopwatch()..start();

while (true) {
if (stopwatch.elapsed > maxWaitTime) {
fail('play did not start');
}
final callEndIcon = find.byIcon(Icons.call_end);

if(tester.any(callEndIcon)) {
await tester.tap(callEndIcon);
await tester.pumpAndSettle();
print("test: play started");
break;
}
await tester.pumpAndSettle(const Duration(seconds: 10));
}
});
}