Skip to content

Commit 197cb2b

Browse files
Merge pull request #40 from SpineEventEngine/remove-web-firebase
Extract `Firebase` implementation from the `dart-client`
2 parents c8ad496 + dea31c4 commit 197cb2b

File tree

22 files changed

+185
-171
lines changed

22 files changed

+185
-171
lines changed

.github/keys/firebase-sa.json.gpg

1.67 KB
Binary file not shown.
1.06 KB
Binary file not shown.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Run integration tests
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
max-parallel: 2
10+
matrix:
11+
os: [windows-latest, ubuntu-latest]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: 'true'
19+
20+
- uses: actions/setup-java@v3
21+
with:
22+
java-version: 8
23+
distribution: zulu
24+
25+
- name: Setup Dart
26+
uses: dart-lang/[email protected]
27+
28+
- name: Activate Dart Protoc Plugin
29+
run: dart pub global activate protoc_plugin
30+
31+
- name: Ensure test resource directory exists
32+
run: mkdir ./integration-tests/test-app/src/main/resources/
33+
shell: bash
34+
35+
- name: Decrypt Firebase service account key
36+
run: ./script/decrypt.sh "$FIREBASE_SA_KEY" ./.github/keys/firebase-sa.json.gpg ./integration-tests/test-app/src/main/resources/spine-dev.json
37+
shell: bash
38+
env:
39+
FIREBASE_SA_KEY: ${{ secrets.FIREBASE_SA_KEY }}
40+
41+
- name: Build with gradle
42+
run: ./gradlew build --stacktrace
43+
44+
- name: Run tests
45+
shell: bash
46+
run: ./gradlew integrationTest --stacktrace

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
submodules: 'true'
16+
17+
- uses: actions/setup-java@v3
18+
with:
19+
java-version: 8
20+
distribution: zulu
21+
22+
- name: Setup Dart
23+
uses: dart-lang/[email protected]
24+
25+
- name: Activate Dart Protoc Plugin
26+
run: dart pub global activate protoc_plugin
27+
28+
- name: Build with gradle
29+
run: ./gradlew build --stacktrace
30+
31+
- name: Decrypt Pub credentials
32+
run: ./script/decrypt.sh "$PUB_CREDENTIALS_KEY" ./.github/keys/pub-credentials.json.gpg $XDG_CONFIG_HOME/dart/pub-credentials.json
33+
shell: bash
34+
env:
35+
PUB_CREDENTIALS_KEY: ${{ secrets.PUB_CREDENTIALS_KEY }}
36+
37+
- name: Publish to Pub
38+
run: ./gradlew publish -x test --stacktrace

.github/workflows/ubuntu.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build under Ubuntu
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- 1.x-dev
8+
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: 'true'
18+
19+
- uses: actions/setup-java@v3
20+
with:
21+
java-version: 8
22+
distribution: zulu
23+
24+
- name: Setup Dart
25+
uses: dart-lang/[email protected]
26+
27+
- name: Activate Dart Protoc Plugin
28+
run: dart pub global activate protoc_plugin
29+
30+
- name: Build with gradle
31+
run: ./gradlew build --stacktrace

.github/workflows/win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
run: >
2828
choco install dart-sdk --limitoutput
2929
&& refreshenv
30-
&& pub global activate protoc_plugin
30+
&& dart pub global activate protoc_plugin
3131
&& gradlew.bat build

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

buildSrc/src/main/groovy/dart/build-tasks.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@
2424
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27-
import org.apache.tools.ant.taskdefs.condition.Os
28-
2927
final def GROUP = 'Dart'
3028
final def packageIndex = "$projectDir/.packages" as File
31-
final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : ''
32-
final def PUB_EXECUTABLE = 'pub' + extension
3329

3430
task resolveDependencies(type: Exec) {
3531
group = GROUP
@@ -38,7 +34,7 @@ task resolveDependencies(type: Exec) {
3834
inputs.file "$projectDir/pubspec.yaml"
3935
outputs.file packageIndex
4036

41-
commandLine PUB_EXECUTABLE, 'get'
37+
commandLine 'dart', 'pub', 'get'
4238

4339
mustRunAfter 'cleanPackageIndex'
4440
}
@@ -57,7 +53,7 @@ task testDart(type: Exec) {
5753
group = GROUP
5854
description = 'Runs Dart tests declared in the `./test` directory. See `https://pub.dev/packages/test#running-tests`.'
5955

60-
commandLine PUB_EXECUTABLE, 'run', 'test'
56+
commandLine 'dart', 'pub', 'run', 'test'
6157

6258
dependsOn 'resolveDependencies'
6359
}

buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27-
import org.apache.tools.ant.taskdefs.condition.Os
28-
2927
final def publicationDir = "$buildDir/pub/publication/$project.name"
30-
final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : ''
31-
final def PUB_EXECUTABLE = 'pub' + extension
3228

3329
task stagePubPublication(type: Copy) {
3430
description = 'Prepares the Dart package for Pub publication.'
@@ -54,7 +50,7 @@ task publishToPub(type: Exec) {
5450
description = 'Publishes this package to Pub.'
5551

5652
workingDir publicationDir
57-
commandLine PUB_EXECUTABLE, 'publish', '--trace'
53+
commandLine 'dart', 'pub', 'publish', '--trace'
5854
final sayYes = new ByteArrayInputStream('y'.getBytes())
5955
standardInput(sayYes)
6056

@@ -67,7 +63,7 @@ task publishToPub(type: Exec) {
6763
task activateLocally(type: Exec) {
6864
description = 'Activates this package locally.'
6965

70-
commandLine PUB_EXECUTABLE, 'global', 'activate', '--source', 'path', publicationDir, '--trace'
66+
commandLine 'dart', 'pub', 'global', 'activate', '--source', 'path', publicationDir, '--trace'
7167

7268
workingDir publicationDir
7369
dependsOn 'stagePubPublication'

buildSrc/src/main/groovy/dependencies.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ final def scripts = [
130130
npmPublishTasks : "$dir/js/npm-publish-tasks.gradle",
131131
npmCli : "$dir/js/npm-cli.gradle",
132132
updatePackageVersion : "$dir/js/update-package-version.gradle",
133-
dartBuildTasks : "$dir/dart/build-tasks.gradle",
134-
pubPublishTasks : "$dir/dart/pub-publish-tasks.gradle",
135133
pmd : "$dir/pmd.gradle",
136134
checkstyle : "$dir/checkstyle.gradle",
137135
runBuild : "$dir/run-build.gradle",

0 commit comments

Comments
 (0)