From ad5885ea0a93f2f9fd6cc803b1fc7eadbf37e966 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 13:05:47 +0300 Subject: [PATCH 01/16] Do not use firebase implementation specific for the web. --- client/lib/rest_firebase_client.dart | 78 ------------------- client/pubspec.yaml | 1 - .../integration-test/client_test.dart | 9 ++- .../dart_firebase_client.dart | 27 +++---- .../integration-test/firebase_app.dart | 23 ++++-- integration-tests/client-test/pubspec.yaml | 1 + 6 files changed, 39 insertions(+), 100 deletions(-) delete mode 100644 client/lib/rest_firebase_client.dart rename client/lib/web_firebase_client.dart => integration-tests/client-test/integration-test/dart_firebase_client.dart (76%) diff --git a/client/lib/rest_firebase_client.dart b/client/lib/rest_firebase_client.dart deleted file mode 100644 index 074eeb3242..0000000000 --- a/client/lib/rest_firebase_client.dart +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import 'package:firebase/firebase_io.dart' as fb; -import 'package:spine_client/firebase_client.dart'; -import 'package:spine_client/src/url.dart'; - -/// A [FirebaseClient] based on the Firebase REST API. -/// -/// This implementation does not have platform limitations. -/// -/// See `WebFirebaseClient` for a web-specific implementation. -/// -/// Note: the [childAdded], [childChanged] and [childRemoved] event streams are not supported by -/// this client implementation. It thus does not support Spine subscriptions. If you need the -/// subscriptions functionality, consider switching to the Firebase Admin SDK based client. -/// -class RestClient implements FirebaseClient { - - static const _doesNotSupportSubscriptions = - "REST Firebase client does not support the subscriptions."; - - final fb.FirebaseClient _client; - final String _databaseUrl; - - /// Creates a new [RestClient] which connects to the database on the given [_databaseUrl] - /// with the given REST API [_client]. - RestClient(this._client, this._databaseUrl); - - @override - Stream get(String path) async* { - var root = await _client.get(Url.from(_databaseUrl, '${path}.json').stringUrl); - if (root == null) { - return; - } - for (var element in root.values) { - yield element.toString(); - } - } - - @override - Stream childAdded(String path) { - throw UnimplementedError(_doesNotSupportSubscriptions); - } - - @override - Stream childChanged(String path) { - throw UnimplementedError(_doesNotSupportSubscriptions); - } - - @override - Stream childRemoved(String path) { - throw UnimplementedError(_doesNotSupportSubscriptions); - } -} diff --git a/client/pubspec.yaml b/client/pubspec.yaml index ccad37010a..4f15572c78 100644 --- a/client/pubspec.yaml +++ b/client/pubspec.yaml @@ -10,7 +10,6 @@ dependencies: protobuf: ^2.0.0 http: ^0.13.3 uuid: ^3.0.4 - firebase: ^9.0.1 fixnum: ^1.0.0 sprintf: ^6.0.0 optional: ^6.0.0 diff --git a/integration-tests/client-test/integration-test/client_test.dart b/integration-tests/client-test/integration-test/client_test.dart index 2c438cb84c..ceea31b7d9 100644 --- a/integration-tests/client-test/integration-test/client_test.dart +++ b/integration-tests/client-test/integration-test/client_test.dart @@ -24,12 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import 'package:firebase_dart/firebase_dart.dart' as fb; import 'package:spine_client/client.dart'; import 'package:spine_client/spine/client/query.pb.dart'; import 'package:spine_client/spine_client.dart'; import 'package:spine_client/time.dart'; import 'package:spine_client/uuids.dart'; -import 'package:spine_client/web_firebase_client.dart'; import 'package:test/test.dart'; import 'endpoints.dart'; @@ -42,9 +42,11 @@ import 'spine/web/test/given/project_progress.pb.dart'; import 'spine/web/test/given/task.pb.dart'; import 'spine/web/test/given/user_tasks.pb.dart'; import 'types.dart' as testTypes; +import 'dart_firebase_client.dart'; @TestOn("browser") void main() { + fb.FirebaseDart.setup(); group('Client should', () { @@ -52,9 +54,10 @@ void main() { late FirebaseClient firebaseClient; late UserId actor; - setUp(() { + setUp(() async { + await FirebaseApp().init(); var database = FirebaseApp().database; - firebaseClient = WebFirebaseClient(database); + firebaseClient = DartFirebaseClient(database); clients = Clients(BACKEND, firebase: firebaseClient, typeRegistries: [testTypes.types()]); diff --git a/client/lib/web_firebase_client.dart b/integration-tests/client-test/integration-test/dart_firebase_client.dart similarity index 76% rename from client/lib/web_firebase_client.dart rename to integration-tests/client-test/integration-test/dart_firebase_client.dart index 0c066ebc1a..f81777c942 100644 --- a/client/lib/web_firebase_client.dart +++ b/integration-tests/client-test/integration-test/dart_firebase_client.dart @@ -1,5 +1,5 @@ /* - * Copyright 2021, TeamDev. All rights reserved. + * Copyright 2022, TeamDev. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,18 +24,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import 'package:firebase/firebase.dart' as fb; +import 'package:firebase_dart/firebase_dart.dart' as fb; import 'package:spine_client/firebase_client.dart'; -/// An implementation of [FirebaseClient] specific to browser JavaScript. +/// An implementation of [FirebaseClient] that uses native firebase implementation. /// -/// See `RestClient` for a platform-agnostic implementation. -/// -class WebFirebaseClient implements FirebaseClient { +class DartFirebaseClient implements FirebaseClient { - final fb.Database _db; + final fb.FirebaseDatabase _db; - WebFirebaseClient(this._db); + DartFirebaseClient(this._db); @override Stream get(String path) { @@ -45,7 +43,8 @@ class WebFirebaseClient implements FirebaseClient { @override Stream childAdded(String path) { return _db - .ref(path) + .reference() + .child(path) .onChildAdded .map(_toJsonString); } @@ -53,7 +52,8 @@ class WebFirebaseClient implements FirebaseClient { @override Stream childChanged(String path) { return _db - .ref(path) + .reference() + .child(path) .onChildChanged .map(_toJsonString); } @@ -61,12 +61,13 @@ class WebFirebaseClient implements FirebaseClient { @override Stream childRemoved(String path) { return _db - .ref(path) + .reference() + .child(path) .onChildRemoved .map(_toJsonString); } - String _toJsonString(event) { - return event.snapshot.toJson().toString(); + String _toJsonString(fb.Event event) { + return event.snapshot.value.toString(); } } diff --git a/integration-tests/client-test/integration-test/firebase_app.dart b/integration-tests/client-test/integration-test/firebase_app.dart index 86b5401f2f..6c6a322720 100644 --- a/integration-tests/client-test/integration-test/firebase_app.dart +++ b/integration-tests/client-test/integration-test/firebase_app.dart @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import 'package:firebase/firebase.dart' as fb; +import 'package:firebase_dart/firebase_dart.dart' as fb; /// A holder of the test Firebase App. /// @@ -35,20 +35,33 @@ class FirebaseApp { static final FirebaseApp _instance = FirebaseApp._internal(); - final fb.App firebaseApp = fb.initializeApp( + var options = fb.FirebaseOptions( apiKey: "AIzaSyD8Nr2zrW9QFLbNS5Kg-Ank-QIZP_jo5pU", authDomain: "spine-dev.firebaseapp.com", databaseURL: "https://spine-dev.firebaseio.com", projectId: "spine-dev", - storageBucket: "", - messagingSenderId: "165066236051" + storageBucket: "spine-dev.appspot.com", + messagingSenderId: "165066236051", + appId: "1:165066236051:web:649b727355f917bdc0ed66", + measurementId: "G-ZVFWCSQG5Y" ); + late fb.FirebaseApp app; + late fb.FirebaseDatabase database; + bool _initialized = false; + factory FirebaseApp() { return _instance; } - fb.Database get database => firebaseApp.database(); + Future init() async { + if (!_initialized) { + app = await fb.Firebase.initializeApp(options: options); + database = fb.FirebaseDatabase(app: app); + _initialized = true; + } + return app; + } FirebaseApp._internal(); } diff --git a/integration-tests/client-test/pubspec.yaml b/integration-tests/client-test/pubspec.yaml index 7fe3199d0b..110dbb8473 100644 --- a/integration-tests/client-test/pubspec.yaml +++ b/integration-tests/client-test/pubspec.yaml @@ -8,6 +8,7 @@ environment: dependencies: spine_client: path: ../../client + firebase_dart: ^1.0.9 dev_dependencies: pedantic: ^1.11.0 From 399e344216c367e9d92931f079dcd772bea87b11 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 13:43:30 +0300 Subject: [PATCH 02/16] Use capital letter for Firebase --- .../client-test/integration-test/dart_firebase_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/client-test/integration-test/dart_firebase_client.dart b/integration-tests/client-test/integration-test/dart_firebase_client.dart index f81777c942..8333259bc1 100644 --- a/integration-tests/client-test/integration-test/dart_firebase_client.dart +++ b/integration-tests/client-test/integration-test/dart_firebase_client.dart @@ -27,7 +27,7 @@ import 'package:firebase_dart/firebase_dart.dart' as fb; import 'package:spine_client/firebase_client.dart'; -/// An implementation of [FirebaseClient] that uses native firebase implementation. +/// An implementation of [FirebaseClient] that uses dart Firebase implementation. /// class DartFirebaseClient implements FirebaseClient { From 35dc63c50c19226441038315646bb5cb9facc4f6 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 13:56:30 +0300 Subject: [PATCH 03/16] Call pub from the dart. --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 41a67b5a83..9030de1e95 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -27,5 +27,5 @@ jobs: run: > choco install dart-sdk --limitoutput && refreshenv - && pub global activate protoc_plugin + && dart pub global activate protoc_plugin && gradlew.bat build From 291e92b2f849b2f1953df57eaa8a69b2443fac74 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 14:25:28 +0300 Subject: [PATCH 04/16] Use dart CLI instead of deprecated pub CLI. --- buildSrc/src/main/groovy/dart/build-tasks.gradle | 8 ++------ buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle | 8 ++------ integration-tests/client-test/build.gradle.kts | 4 +--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/buildSrc/src/main/groovy/dart/build-tasks.gradle b/buildSrc/src/main/groovy/dart/build-tasks.gradle index 38afb33541..932b21c533 100644 --- a/buildSrc/src/main/groovy/dart/build-tasks.gradle +++ b/buildSrc/src/main/groovy/dart/build-tasks.gradle @@ -24,12 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.apache.tools.ant.taskdefs.condition.Os - final def GROUP = 'Dart' final def packageIndex = "$projectDir/.packages" as File -final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : '' -final def PUB_EXECUTABLE = 'pub' + extension task resolveDependencies(type: Exec) { group = GROUP @@ -38,7 +34,7 @@ task resolveDependencies(type: Exec) { inputs.file "$projectDir/pubspec.yaml" outputs.file packageIndex - commandLine PUB_EXECUTABLE, 'get' + commandLine 'dart', 'pub', 'get' mustRunAfter 'cleanPackageIndex' } @@ -57,7 +53,7 @@ task testDart(type: Exec) { group = GROUP description = 'Runs Dart tests declared in the `./test` directory. See `https://pub.dev/packages/test#running-tests`.' - commandLine PUB_EXECUTABLE, 'run', 'test' + commandLine 'dart', 'pub', 'run', 'test' dependsOn 'resolveDependencies' } diff --git a/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle b/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle index 1f84dad3bf..30fa03ae2b 100644 --- a/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle +++ b/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle @@ -24,11 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.apache.tools.ant.taskdefs.condition.Os - final def publicationDir = "$buildDir/pub/publication/$project.name" -final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : '' -final def PUB_EXECUTABLE = 'pub' + extension task stagePubPublication(type: Copy) { description = 'Prepares the Dart package for Pub publication.' @@ -54,7 +50,7 @@ task publishToPub(type: Exec) { description = 'Publishes this package to Pub.' workingDir publicationDir - commandLine PUB_EXECUTABLE, 'publish', '--trace' + commandLine 'dart', 'pub', 'publish', '--trace' final sayYes = new ByteArrayInputStream('y'.getBytes()) standardInput(sayYes) @@ -67,7 +63,7 @@ task publishToPub(type: Exec) { task activateLocally(type: Exec) { description = 'Activates this package locally.' - commandLine PUB_EXECUTABLE, 'global', 'activate', '--source', 'path', publicationDir, '--trace' + commandLine 'dart', 'pub', 'global', 'activate', '--source', 'path', publicationDir, '--trace' workingDir publicationDir dependsOn 'stagePubPublication' diff --git a/integration-tests/client-test/build.gradle.kts b/integration-tests/client-test/build.gradle.kts index 4610f1948c..b25fc713e8 100644 --- a/integration-tests/client-test/build.gradle.kts +++ b/integration-tests/client-test/build.gradle.kts @@ -52,11 +52,9 @@ tasks["testDart"].enabled = false val integrationTestDir = "./integration-test" val integrationTest by tasks.creating(Exec::class) { - val pub = "pub" + if (Os.isFamily(Os.FAMILY_WINDOWS)) ".bat" else "" - // Run tests in Chrome browser because they use a `WebFirebaseClient` which only works in web // environment. - commandLine(pub, "run", "test", integrationTestDir, "-p", "chrome") + commandLine("dart", "pub", "run", "test", integrationTestDir, "-p", "chrome") dependsOn("resolveDependencies", ":test-app:appBeforeIntegrationTest") finalizedBy(":test-app:appAfterIntegrationTest") From 26d536eea740e54ab94b0cbab7172b62dcf4e651 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 15:00:30 +0300 Subject: [PATCH 05/16] Delete travis config. --- .travis.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c92c2af77e..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: java - -jdk: - - openjdk8 - -env: - global: - - PATH="$PATH:/usr/lib/dart/bin" - - FORMAL_GIT_HUB_PAGES_AUTHOR: "spine-developers@teamdev.com" - -before_install: - - chmod +x gradlew - - chmod +x config/scripts/register-ssh-key.sh - - # Install Dart, `pub`, and the `protoc_plugin` pub package. - - chmod +x ./config/scripts/update-apt.sh - - ./config/scripts/update-apt.sh - - sudo apt-get install dart - - dart --version - - pub global activate protoc_plugin - - chmod +x ./script/unpack-credentials.sh - - ./script/unpack-credentials.sh - -script: - - ./gradlew build --stacktrace - - ./gradlew integrationTest - -deploy: - skip_cleanup: true - provider: script - script: bash config/scripts/publish-artifacts.sh - on: - branch: master - condition: $TRAVIS_PULL_REQUEST == "false" From 2c207bb949ee338479c14f5ee39e9672d9d2b890 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 15:42:07 +0300 Subject: [PATCH 06/16] Do not depend on config in dart scripts. --- buildSrc/src/main/groovy/dependencies.gradle | 2 -- .../src/main/kotlin/io/spine/gradle/internal/deps.kt | 9 ++++++--- .../src/main/kotlin/io/spine/internal/gradle/Scripts.kt | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/groovy/dependencies.gradle b/buildSrc/src/main/groovy/dependencies.gradle index 7f4b9e2de4..36c55733ec 100644 --- a/buildSrc/src/main/groovy/dependencies.gradle +++ b/buildSrc/src/main/groovy/dependencies.gradle @@ -130,8 +130,6 @@ final def scripts = [ npmPublishTasks : "$dir/js/npm-publish-tasks.gradle", npmCli : "$dir/js/npm-cli.gradle", updatePackageVersion : "$dir/js/update-package-version.gradle", - dartBuildTasks : "$dir/dart/build-tasks.gradle", - pubPublishTasks : "$dir/dart/pub-publish-tasks.gradle", pmd : "$dir/pmd.gradle", checkstyle : "$dir/checkstyle.gradle", runBuild : "$dir/run-build.gradle", diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt index 0ae926bf1c..06a444946b 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt @@ -26,10 +26,10 @@ package io.spine.gradle.internal +import java.net.URI import org.gradle.api.Project import org.gradle.api.artifacts.ConfigurationContainer import org.gradle.api.artifacts.dsl.RepositoryHandler -import java.net.URI /* * This file describes shared dependencies of Spine sub-projects. @@ -256,6 +256,7 @@ object Test { object Scripts { private const val COMMON_PATH = "/config/gradle/" + private const val DART = "/buildSrc/src/main/groovy/dart/" fun testArtifacts(p: Project) = p.script("test-artifacts.gradle") fun testOutput(p: Project) = p.script("test-output.gradle") @@ -271,8 +272,6 @@ object Scripts { fun npmPublishTasks(p: Project) = p.script("js/npm-publish-tasks.gradle") fun npmCli(p: Project) = p.script("js/npm-cli.gradle") fun updatePackageVersion(p: Project) = p.script("js/update-package-version.gradle") - fun dartBuildTasks(p: Project) = p.script("dart/build-tasks.gradle") - fun pubPublishTasks(p: Project) = p.script("dart/pub-publish-tasks.gradle") fun pmd(p: Project) = p.script("pmd.gradle") fun checkstyle(p: Project) = p.script("checkstyle.gradle") fun runBuild(p: Project) = p.script("run-build.gradle") @@ -283,7 +282,11 @@ object Scripts { fun generatePom(p: Project) = p.script("generate-pom.gradle") fun updateGitHubPages(p: Project) = p.script("update-gh-pages.gradle") + fun dartBuildTasks(p: Project) = p.dartScript("build-tasks.gradle") + fun pubPublishTasks(p: Project) = p.dartScript("pub-publish-tasks.gradle") + private fun Project.script(name: String) = "${rootDir}$COMMON_PATH$name" + private fun Project.dartScript(name: String) = "${rootDir}$DART$name" } object Deps { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt index fffd4b1bbb..4233ec5faa 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt @@ -47,8 +47,6 @@ object Scripts { fun npmPublishTasks(p: Project) = p.script("js/npm-publish-tasks.gradle") fun npmCli(p: Project) = p.script("js/npm-cli.gradle") fun updatePackageVersion(p: Project) = p.script("js/update-package-version.gradle") - fun dartBuildTasks(p: Project) = p.script("dart/build-tasks.gradle") - fun pubPublishTasks(p: Project) = p.script("dart/pub-publish-tasks.gradle") fun pmd(p: Project) = p.script("pmd.gradle") fun checkstyle(p: Project) = p.script("checkstyle.gradle") fun runBuild(p: Project) = p.script("run-build.gradle") From c8b1c0c020389cf1e66009ed053161a86fadf4d5 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 16:47:51 +0300 Subject: [PATCH 07/16] Add action to build under Ubuntu. --- .github/workflows/ubuntu.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ubuntu.yml diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000000..432c041928 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,31 @@ +name: Build under Ubuntu + +on: + pull_request: + branches: + - master + - 1.x-dev + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: zulu + + - name: Setup Dart + uses: dart-lang/setup-dart@v1.3 + + - name: Activate Dart Protoc Plugin + run: dart pub global activate protoc_plugin + + - name: Build with gradle + run: ./gradlew build \ No newline at end of file From ab12caf311d5d49534a28adbbb276e3d026e6ca4 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 16:53:55 +0300 Subject: [PATCH 08/16] Add integration tests. --- .github/workflows/ubuntu.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 432c041928..545369950d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -28,4 +28,7 @@ jobs: run: dart pub global activate protoc_plugin - name: Build with gradle - run: ./gradlew build \ No newline at end of file + run: ./gradlew build --stacktrace + + - name: Run integration tests + run: ./gradlew integrationTest \ No newline at end of file From 664d0af00f35cbe9b25b7b113f82d44320800c1b Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 17:01:02 +0300 Subject: [PATCH 09/16] Unpack credentials for integration tests. --- .github/workflows/ubuntu.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 545369950d..4101d79743 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -30,5 +30,10 @@ jobs: - name: Build with gradle run: ./gradlew build --stacktrace + - name: Unpack credentials + run: > + chmod +x ./script/unpack-credentials.sh + && ./script/unpack-credentials.sh + - name: Run integration tests run: ./gradlew integrationTest \ No newline at end of file From 49b5b370e7a9c0f5645a40f896937873d70c9f08 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Thu, 23 Jun 2022 17:01:58 +0300 Subject: [PATCH 10/16] Unpack credentials before build. --- .github/workflows/ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4101d79743..906ed35531 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -27,13 +27,13 @@ jobs: - name: Activate Dart Protoc Plugin run: dart pub global activate protoc_plugin - - name: Build with gradle - run: ./gradlew build --stacktrace - - name: Unpack credentials run: > chmod +x ./script/unpack-credentials.sh && ./script/unpack-credentials.sh + - name: Build with gradle + run: ./gradlew build --stacktrace + - name: Run integration tests run: ./gradlew integrationTest \ No newline at end of file From 5d75eb4fbf43d600cd083c7e63a8669075af4e52 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 12:01:52 +0300 Subject: [PATCH 11/16] Add action for integration test. Get rid of travis secret decryption. --- .github/keys/firebase-sa.json.gpg | Bin 0 -> 1715 bytes .github/workflows/integration-tests.yml | 46 ++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 8 ----- script/decrypt.sh | 42 ++++++++++++++++++++++ 4 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 .github/keys/firebase-sa.json.gpg create mode 100644 .github/workflows/integration-tests.yml create mode 100755 script/decrypt.sh diff --git a/.github/keys/firebase-sa.json.gpg b/.github/keys/firebase-sa.json.gpg new file mode 100644 index 0000000000000000000000000000000000000000..4925f29ba1fa2fd3b5c0b5f3526920b8f27ef39c GIT binary patch literal 1715 zcmV;k22A;k4Fm}T0<=-=EWVF`)%4Qp0pu|OIHTps*-w&5{=JAP@??hEGr0ZD!q*dS zbQFSQ>BPMa4hvpLlh>y$-M$Q>@IR6=f55CTxrY)5p{`dpfZBM6&og6@U{p1*@qx!B zb;`qQ@!`LzTdUu0ax8NMCCWpO0KMJVy{?Zn#RAurfnze9Llh+82@NXTioYpgqjtGjoXurxhcU(*iryflir z=-hBxPHnFcmqB)*!{RG{A^|}U%RN$k{V~f15?3WEw;fI*aaw>qXW(WhvvT0)?#6pC) z!D>UwCaOOWxak|=7}oqbg+j6?uU{wU>+aROZnv8%B4SHBiSj^|aR6eiFEh_kdSKG` z0`*{ufe3+LKJFy+y?BgI(wL&n065sf2(T1@M?A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000000000..bb772f7df3 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,46 @@ +name: Run integration tests + +on: push + +jobs: + build: + strategy: + fail-fast: false + max-parallel: 2 + matrix: + os: [windows-latest, ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: zulu + + - name: Setup Dart + uses: dart-lang/setup-dart@v1.3 + + - name: Activate Dart Protoc Plugin + run: dart pub global activate protoc_plugin + + - name: Ensure test resource directory exists + run: mkdir ./integration-tests/test-app/src/main/resources/ + shell: bash + + - name: Decrypt Firebase service account key + run: ./scripts/decrypt.sh "$FIREBASE_SA_KEY" ./.github/keys/firebase-sa.json.gpg ./integration-tests/test-app/src/main/resources/spine-dev.json + shell: bash + env: + FIREBASE_SA_KEY: ${{ secrets.FIREBASE_SA_KEY }} + + - name: Build with gradle + run: ./gradlew build --stacktrace + + - name: Run tests + shell: bash + run: ./gradlew integrationTest --stacktrace diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 906ed35531..bee20af16b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -27,13 +27,5 @@ jobs: - name: Activate Dart Protoc Plugin run: dart pub global activate protoc_plugin - - name: Unpack credentials - run: > - chmod +x ./script/unpack-credentials.sh - && ./script/unpack-credentials.sh - - name: Build with gradle run: ./gradlew build --stacktrace - - - name: Run integration tests - run: ./gradlew integrationTest \ No newline at end of file diff --git a/script/decrypt.sh b/script/decrypt.sh new file mode 100755 index 0000000000..67240a53cf --- /dev/null +++ b/script/decrypt.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# +# Copyright 2022, TeamDev. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Redistribution and use in source and/or binary forms, with or without +# modification, must retain the above copyright notice and the following +# disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# Decrypts a file via `gpg`. +# +# Params: +# 1. The secret passphrase used when encrypting the file. +# 2. The encrypted file. +# 3. The path where the decrypted file should go. +# + +if [ "$#" -ne 3 ]; then + echo "Usage: decrypt.sh " + exit 1 +fi + +gpg --quiet --batch --yes --decrypt --passphrase="$1" --output "$3" "$2" From 8a9dff0cbe8c38a67ceb3a6655eff1831793bedf Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 12:04:45 +0300 Subject: [PATCH 12/16] Fix script path. --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bb772f7df3..36328301e1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,7 +33,7 @@ jobs: shell: bash - name: Decrypt Firebase service account key - run: ./scripts/decrypt.sh "$FIREBASE_SA_KEY" ./.github/keys/firebase-sa.json.gpg ./integration-tests/test-app/src/main/resources/spine-dev.json + run: ./script/decrypt.sh "$FIREBASE_SA_KEY" ./.github/keys/firebase-sa.json.gpg ./integration-tests/test-app/src/main/resources/spine-dev.json shell: bash env: FIREBASE_SA_KEY: ${{ secrets.FIREBASE_SA_KEY }} From 319c5925137d48802185886a78d002c5e7597e03 Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 12:10:36 +0300 Subject: [PATCH 13/16] Remove outdated travis credentials.tar.enc. --- credentials.tar.enc | Bin 13328 -> 0 bytes script/unpack-credentials.sh | 37 ----------------------------------- 2 files changed, 37 deletions(-) delete mode 100644 credentials.tar.enc delete mode 100644 script/unpack-credentials.sh diff --git a/credentials.tar.enc b/credentials.tar.enc deleted file mode 100644 index 4261d2563182f67e33a4e15fda5485834e6486c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13328 zcmV+rH1Eso2vF4tmNMNH8Tl%<+Qb>M2+%G_eh|N~#P4rEpiBv^pm;|<9Y)>j)HN6K z6{SNyCM278h8B0wXp|-W<~OBQ4d*hY;azsHHNS3i4gog8s%-DAKA)o zyosELUdjzdQQC=C^W*w9Iz3;L z4>4pv+`U)^i^g59jkYW=*|W!{es}efXo2Fos`(U4Gb_E*jnOVo70x&P<3}+m+|5JE z`XDIIE$*^9JAK6l-&Ze*YE#&?(6~t#i1FauE=o5?Wp5eavKFcnyZA3s=PI|@_+qq8TnP9aq5+8xUJ-wEhI02oWc4?FlnHZnbj zPkfk85GMOBQR+wYa1BTU-dgo4w~!Qj$)2UyKLKfnz=I^sq)6B4w!zGX^z%tolA|+z zgZ?r2R={hP1lsPNsWCHEz$})USVl|{3cB^Eyj-~>kD&`%8?Z=xPV=u#LduQSc8i519J*I5^azwz*Fy^em+2}rDRk)Mua_@7z zx>JuSbrMvIQtEJ=0765^M3Z6SrwL|kJ=|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)qcXNMmt#d zfuvKrppkx?98OP3aX$GDRA~n~CDW-gsPP@bZ6VbutSkUK>E$7um(0+R0*2@>QRMhQmns z95I&i+-~HbRtUtZQPBC;y-J+|#?jA-~55)2JiP7TvbdmGvgNId!0G8_gY=-e! zAkQVD0LATZHs|cw>vl(eH5%l@z_37qjAwug6A37XNqf=55ZG$3{FQE}uC#R`_?)J;ct`@fM22T{u(E5ND4QbZ|+RS)E zTrILZQH$rVLpCd}vaa4EGdTUAHHEt;_DrYOy%5CcrHT!@YAxRj5SMRJcEK@oIG)Uj zlqaLEzRr@RBf8er-kS z9-$|$jMeIASB=2&S9ChOa`@*fs190)QQ5);PN0>R8wBprOAK>*~Mf4h3zQl=(Vi?(4$kFyIeCg$|P z&M~M@D6u3mv62$l*q7IqjK;_K!4vpc3vbIlQ%wnSH!a&SHUpo(ynWY{*m@HiG9k<` zaB&)@FHR;?oI^`3>bnWn{Aas(ylaOqQ#4D4fi)1d;YKp(lS0E7N`@++sObH9HY?Z} z9$ZQIe#J2l@qd_wflFPEcvyqBaBlF1o{tAxlv+}12GT`&4CA;= zX1x5h2|9PtE49M<=pSzE-{rJcR>O~@8mj&$&tpKJp7Fl9Xx(9`*^l6VMn?D>up)Q{B7= zx<)x8(H5CFX4wuU;}^VPpB!NSo+BT diff --git a/script/unpack-credentials.sh b/script/unpack-credentials.sh deleted file mode 100644 index 4dabcd7ba6..0000000000 --- a/script/unpack-credentials.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# -# Copyright 2021, TeamDev. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Redistribution and use in source and/or binary forms, with or without -# modification, must retain the above copyright notice and the following -# disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# Decrypt and unpack credentials: -# - spine-dev.json - the Firebase service account to use for integration tests; -# - pub-credentials.json - credentials to publish package to Pub; -# - deploy_key_rsa - private key for deploying GitHub Pages. -openssl aes-256-cbc -K $encrypted_54891cbed47a_key -iv $encrypted_54891cbed47a_iv -in credentials.tar.enc -out credentials.tar -d -tar xvf credentials.tar -mkdir ./integration-tests/test-app/src/main/resources -mv ./spine-dev-firebase.json ./integration-tests/test-app/src/main/resources/spine-dev.json -mv ./pub-credentials.json "$HOME"/.pub-cache/credentials.json From ad6f2ef4453ffd4dd0ecdb8d6ec50f3d2dd932ca Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 15:41:48 +0300 Subject: [PATCH 14/16] Update Spine to 1.8.2 and this library to 1.8.2. --- version.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.gradle.kts b/version.gradle.kts index 218e49a123..323305f9ae 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -29,6 +29,6 @@ * already in the root directory. */ -val spineBaseVersion: String by extra("1.8.0") -val spineWebVersion: String by extra("1.8.0") -val versionToPublish: String by extra("1.8.1") +val spineBaseVersion: String by extra("1.8.2") +val spineWebVersion: String by extra("1.8.2") +val versionToPublish: String by extra("1.8.2") From 62f5320c7887ae2616bd442c7725c67f52ac6b4b Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 16:03:01 +0300 Subject: [PATCH 15/16] Add script to publish project to the PUB. --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..6cd876eeb2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish + +on: + push: + branches: [master] + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: zulu + + - name: Setup Dart + uses: dart-lang/setup-dart@v1.3 + + - name: Activate Dart Protoc Plugin + run: dart pub global activate protoc_plugin + + - name: Build with gradle + run: ./gradlew build --stacktrace + + - name: Decrypt Pub credentials + run: ./script/decrypt.sh "$PUB_CREDENTIALS_KEY" ./.github/keys/pub-credentials.json.gpg $XDG_CONFIG_HOME/dart/pub-credentials.json + shell: bash + env: + PUB_CREDENTIALS_KEY: ${{ secrets.PUB_CREDENTIALS_KEY }} + + - name: Publish to Pub + run: ./gradlew publish -x test --stacktrace \ No newline at end of file From dea31c404e08e0f632e86c27497f2fa0aca4e6bd Mon Sep 17 00:00:00 2001 From: "dmitry.kashcheiev" Date: Fri, 24 Jun 2022 16:16:35 +0300 Subject: [PATCH 16/16] Add encrypted credentials. --- .github/keys/pub-credentials.json.gpg | Bin 0 -> 1086 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/keys/pub-credentials.json.gpg diff --git a/.github/keys/pub-credentials.json.gpg b/.github/keys/pub-credentials.json.gpg new file mode 100644 index 0000000000000000000000000000000000000000..f2552afc377dfa07da23ba83b58d65c31bbcc7c0 GIT binary patch literal 1086 zcmV-E1i|}^4Fm}T0yf|xKvW|aKL66{0pMpVWz`J7WLP*Ps2k`O zvBg9J97TGOm~=C}s(IcI8%*gVO8ldVv7XTpvN>EJFqT=c>p7lI9M!L7DZ>kW| z)ELk}gfOn(dS4(bi4$b#vk@_{-uSxl*re(CjLBu*y>h_JU5Fg%=K?4QSm%Q4^!VX; zMBOc8BKsCM|0Etz&_r6s=oH1Pm_V}1Y)F|jlF}g@_d|0N26Usm?qiX{MA044;U9k@PiGVfRJg3@Xn=kBIdSm^TRRc|@Xq+%+&5+r zqc?{qIe?0kv1)aFc;}Eui6prMGyA2W`N@sL2Iv9L%pGJMvsq75EQ}Wa#@C3N^7wd= zJb-BC%z(EH^rn@{;b93+y_L_3GNr098TPOnF+CCm;}<*o65u$XqAq%c2O~h*_ixXi zz~Bm_hiPnV_gnWhhv3ad&}p!YTB$vaUz+h=6YQnT^4`=SS^Or0fHcTy{>_O zfHosdQSK6|eSau(uEB~T1S2Wo0F%jR;fG1LM6ktYvC)dPIz}3lGMZR(924_9G*V`HUwnh?uST;ddPUor-=^vg*ZGje%kgGn_+uQ)S9p z6K$_6J^_#d?3ZsK^UcUrE2!hB7JndkJcYd;o8owWD$RwDWAKW2#Y9et_`lsjUOQHD2Tz0)rqidHiIBi_i`f5d_y8y7qH=27s^uFlYI6$`KA*xG zRV#C{7tjjg%#&3KbWx4g5eR=Se1I**IqzuYhIO*cUnU-y$kz;nV_?-7zc$@w$uf>x}nY&KEIjiFyG?Z^@&o3s8e`is2N2}ed!bf zemc+7I!{4&EOBnneUF#KTx#x%UVgiLpZaqps8z^r>fhrS&6gd;3Zya5&Sw8Y*1h3= E?Bq%?J^%m! literal 0 HcmV?d00001