mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: only run appflowy cloud if it's not exist (#5799)
* chore: only run appflowy cloud if it's not exist * chore: update * chore: log error * chore: fix sign out test * chore: update test
This commit is contained in:
parent
01747f13e8
commit
1e54c2dc7c
5
.github/workflows/flutter_ci.yaml
vendored
5
.github/workflows/flutter_ci.yaml
vendored
@ -248,10 +248,13 @@ jobs:
|
||||
env:
|
||||
BACKEND_VERSION: 0.3.24-amd64
|
||||
run: |
|
||||
docker compose down -v --remove-orphans
|
||||
if [ "$(docker ps --filter name=appflowy-cloud -q)" == "" ]; then
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
else
|
||||
echo "Docker container 'appflowy-cloud' is already running."
|
||||
fi
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
9
.github/workflows/rust_ci.yaml
vendored
9
.github/workflows/rust_ci.yaml
vendored
@ -106,11 +106,14 @@ jobs:
|
||||
|
||||
- name: Run Docker-Compose
|
||||
working-directory: AppFlowy-Cloud
|
||||
env:
|
||||
BACKEND_VERSION: 0.3.24-amd64
|
||||
run: |
|
||||
docker pull appflowyinc/appflowy_cloud:latest
|
||||
if [ "$(docker ps --filter name=appflowy-cloud -q)" == "" ]; then
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
else
|
||||
echo "Docker container 'appflowy-cloud' is already running."
|
||||
fi
|
||||
|
||||
- name: Run rust-lib tests
|
||||
working-directory: frontend/rust-lib
|
||||
|
@ -47,11 +47,11 @@ void main() {
|
||||
);
|
||||
await tester.tapButton(find.byType(SignInOutButton));
|
||||
|
||||
tester.expectToSeeText(LocaleKeys.button_confirm.tr());
|
||||
await tester.tapButtonWithName(LocaleKeys.button_confirm.tr());
|
||||
tester.expectToSeeText(LocaleKeys.button_ok.tr());
|
||||
await tester.tapButtonWithName(LocaleKeys.button_ok.tr());
|
||||
|
||||
// Go to the sign in page again
|
||||
await tester.pumpAndSettle(const Duration(seconds: 1));
|
||||
await tester.pumpAndSettle(const Duration(seconds: 5));
|
||||
tester.expectToSeeGoogleLoginButton();
|
||||
});
|
||||
|
||||
|
@ -50,10 +50,10 @@ void main() {
|
||||
await tester.tapEscButton();
|
||||
|
||||
// wait 2 seconds for the sync to finish
|
||||
await tester.pumpAndSettle(const Duration(seconds: 2));
|
||||
});
|
||||
await tester.pumpAndSettle(const Duration(seconds: 6));
|
||||
});
|
||||
|
||||
|
||||
testWidgets('get user icon and name from server', (tester) async {
|
||||
await tester.initializeAppFlowy(
|
||||
cloudType: AuthenticatorType.appflowyCloudSelfHost,
|
||||
@ -72,4 +72,6 @@ void main() {
|
||||
|
||||
expect(profileSetting.name, name);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
|
||||
import 'package:appflowy_result/appflowy_result.dart';
|
||||
import 'package:flowy_infra/uuid.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Only used for testing.
|
||||
class AppFlowyCloudMockAuthService implements AuthService {
|
||||
@ -64,12 +65,18 @@ class AppFlowyCloudMockAuthService implements AuthService {
|
||||
);
|
||||
Log.info("UserEventOauthSignIn with payload: $payload");
|
||||
return UserEventOauthSignIn(payload).send().then((value) {
|
||||
value.fold((l) => null, (err) => Log.error(err));
|
||||
value.fold(
|
||||
(l) => null,
|
||||
(err) {
|
||||
debugPrint("Error: $err");
|
||||
Log.error(err);
|
||||
},
|
||||
);
|
||||
return value;
|
||||
});
|
||||
},
|
||||
(r) {
|
||||
Log.error(r);
|
||||
debugPrint("Error: $r");
|
||||
return FlowyResult.failure(r);
|
||||
},
|
||||
);
|
||||
|
@ -411,7 +411,8 @@ class _UserProfileSettingState extends State<UserProfileSetting> {
|
||||
),
|
||||
const HSpace(16),
|
||||
if (!isEditing) ...[
|
||||
Padding(
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@ -437,6 +438,7 @@ class _UserProfileSettingState extends State<UserProfileSetting> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
] else ...[
|
||||
Flexible(
|
||||
child: SettingsInputField(
|
||||
|
Loading…
Reference in New Issue
Block a user