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

Add jobs to deploy and cleanup baas on cloud-dev #309

Merged
merged 27 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
89c8c45
Add jobs to deploy and cleanup baas on cloud-dev
nirinchev Mar 23, 2022
458d34d
Trigger a build
nirinchev Mar 23, 2022
e4309bf
Don't be so secretive about the urls
nirinchev Mar 23, 2022
7eeb93e
Add a PR build
nirinchev Mar 23, 2022
a47a3f8
Bring back baas
nirinchev Mar 23, 2022
319cd2d
Baas client WIP
nirinchev Mar 23, 2022
9ace801
Wrap up the baas client
nirinchev Mar 24, 2022
ea9d9c1
Try to deploy apps earlier
nirinchev Mar 24, 2022
83c3ba2
Merge branch 'master' into ni/baas
nirinchev Mar 24, 2022
e29f855
Trigger build
nirinchev Mar 24, 2022
3a83711
Do a proper checkout
nirinchev Mar 24, 2022
b89715f
Revert unrelated change
nirinchev Mar 24, 2022
8ae6ab1
Revert linux workflow
nirinchev Mar 24, 2022
b452e1f
Apply suggestions from code review
nirinchev Mar 24, 2022
b083f33
Nitpicking suggestions
nielsenko Mar 24, 2022
fd7f6af
Prefer const ctors
nielsenko Mar 24, 2022
699ee86
Fix workflow
nirinchev Mar 24, 2022
c2aa08b
Remove some default args
nirinchev Mar 24, 2022
52d71e7
Merge branch 'nielsenko/bass-suggestions' into ni/baas
nirinchev Mar 24, 2022
eec8649
Clean up the PR
nirinchev Mar 24, 2022
fd01fce
Fix indents
nirinchev Mar 24, 2022
f076c96
Add http to flutter dev dependencies
nirinchev Mar 24, 2022
8f914c4
Try to fix build again
nirinchev Mar 24, 2022
c25053b
Remove flutter linux workflow
nirinchev Mar 24, 2022
2c43087
Update .github/workflows/pr.yml
nirinchev Mar 25, 2022
938c7f2
Code review fixes
nirinchev Mar 28, 2022
280a47e
Merge branch 'master' into ni/baas
nirinchev Mar 28, 2022
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
154 changes: 154 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: PR Build

on:
push:
branches:
- master
pull_request:
nirinchev marked this conversation as resolved.
Show resolved Hide resolved
env:
REALM_CI: true

jobs:
baas-linux:
runs-on: ubuntu-latest
name: BaaS Linux
outputs:
clusterName: ${{ steps.deploy-mdb-apps.outputs.clusterName }}
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
- uses: realm/ci-actions/mdb-realm/deployApps@fac1d6958f03d71de743305ce3ab27594efbe7b7
nielsenko marked this conversation as resolved.
Show resolved Hide resolved
id: deploy-mdb-apps
with:
projectId: ${{ secrets.ATLAS_PROJECT_ID }}
apiKey: ${{ secrets.ATLAS_PUBLIC_API_KEY }}
privateApiKey: ${{ secrets.ATLAS_PRIVATE_API_KEY }}
differentiator: dart-linux
blagoev marked this conversation as resolved.
Show resolved Hide resolved
- name : Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
- name: Deploy Apps
run: dart run realm_dart deploy-apps --baas-url https://realm-dev.mongodb.com --atlas-cluster ${{ steps.deploy-mdb-apps.outputs.clusterName }} --api-key ${{ secrets.ATLAS_PUBLIC_API_KEY }} --private-api-key ${{ secrets.ATLAS_PRIVATE_API_KEY }} --project-id ${{ secrets.ATLAS_PROJECT_ID }}
nirinchev marked this conversation as resolved.
Show resolved Hide resolved
build-linux:
runs-on: ubuntu-latest
name: Build Linux
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build Realm Dart for Linux
run: ./scripts/build-linux.sh
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: librealm-linux
nielsenko marked this conversation as resolved.
Show resolved Hide resolved
path: binary/**
retention-days: 1

tests-linux:
runs-on: ubuntu-latest
name: Tests Linux
env:
BAAS_URL: https://realm-dev.mongodb.com
BAAS_CLUSTER: ${{ needs.baas-linux.outputs.clusterName }}
BAAS_API_KEY: ${{ secrets.ATLAS_PUBLIC_API_KEY }}
BAAS_PRIVATE_API_KEY: ${{ secrets.ATLAS_PRIVATE_API_KEY }}
BAAS_PROJECT_ID: ${{ secrets.ATLAS_PROJECT_ID}}
needs:
- baas-linux
- build-linux
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
- name: Fetch artifacts
uses: actions/download-artifact@v2
with:
name: librealm-linux
path: binary
- name : Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Run tests
run: |
dart test -r expanded -j 1 --test-randomize-ordering-seed random

# TODO: these should go away once we have a proper release workflow
- name: Archive binary
if: ${{ success() && github.event_name == 'push' && github.ref_type == 'tag' }}
run: |
dart run realm_dart archive --source-dir $(pwd)/binary/linux --output-file $ARCHIVE_PATH
- name: Release artifacts
if: ${{ success() && github.event_name == 'push' && github.ref_type == 'tag' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
draft: true
omitNameDuringUpdate: true
prerelease: false
omitPrereleaseDuringUpdate: true
artifacts: ${{ env.ARCHIVE_PATH }}
body: "ADD RELEASE NOTES"
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}

flutter-linux:
runs-on: ubuntu-latest
name: Flutter Tests Linux
needs:
- build-linux
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
- name: Setup GTK
run: |
sudo apt-get update -y
sudo apt-get install -y libgtk-3-dev xvfb
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
nirinchev marked this conversation as resolved.
Show resolved Hide resolved
- name: Fetch artifacts
uses: actions/download-artifact@v2
with:
name: librealm-linux
path: binary
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Enable Flutter Desktop support
run: flutter config --enable-linux-desktop
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: xvfb-run flutter drive -d linux --target=test_driver/app.dart --suppress-analytics --dart-entrypoint-args="" #--verbose #-a="Some test name"
working-directory: ./flutter/realm_flutter/tests


cleanup-linux:
runs-on: ubuntu-latest
name: Cleanup Linux
nirinchev marked this conversation as resolved.
Show resolved Hide resolved
needs:
- tests-linux
if: always()
timeout-minutes: 5
steps:
- uses: realm/ci-actions/mdb-realm/cleanup@fac1d6958f03d71de743305ce3ab27594efbe7b7
nielsenko marked this conversation as resolved.
Show resolved Hide resolved
with:
projectId: ${{ secrets.ATLAS_PROJECT_ID}}
apiKey: ${{ secrets.ATLAS_PUBLIC_API_KEY}}
privateApiKey: ${{ secrets.ATLAS_PRIVATE_API_KEY }}
differentiator: dart-linux
60 changes: 0 additions & 60 deletions .github/workflows/realm-dart-linux.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/realm-flutter-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Install dependencies
run: flutter pub get

Expand Down Expand Up @@ -87,5 +87,5 @@ jobs:
artifacts: ${{ env.ARCHIVE_PATH }}
body: "ADD RELEASE NOTES"
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

47 changes: 0 additions & 47 deletions .github/workflows/realm-flutter-linux.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/realm-flutter-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- name: Run tests
run: flutter drive -d macos --target=test_driver/app.dart --suppress-analytics --dart-entrypoint-args="" #--verbose #-a="Some test name"
working-directory: ./flutter/realm_flutter/tests

38 changes: 28 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
x.x.x Release notes (yyyy-MM-dd)
==============================================================

**This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.**

### Enhancements
* None

### Fixed
* Fix running package commands.

### Compatibility
* Dart ^2.15 on Windows, MacOS and Linux

### Internal
* Added a command to deploy a MongoDB Realm app to `realm_dart`. Usage: `dart run realm_dart deploy-apps`. By default it will deploy apps to `http://localhost:9090` which is the endpoint of the local docker image. If `--atlas-cluster` is provided, it will authenticate, create an application and link the provided cluster to it. (PR [#309](https://github.com/realm/realm-dart/pull/309))
* Unit tests will now attempt to lookup and create if necessary MongoDB applications (similarly to the above mentioned command). See `test.dart/setupBaas()` for the environment variables that control the Url and Atlas Cluster that will be used. If the `BAAS_URL` environment variable is not set, no apps will be imported and sync tests will not run. (PR [#309](https://github.com/realm/realm-dart/pull/309))

0.2.1+alpha Release notes (2022-03-20)
==============================================================

**This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.**

### Enhancements
* Support change notifications on query results. ([#208](https://github.com/realm/realm-dart/pull/208))

Every `RealmResults<T>` object now has a `changes` method returning a `Stream<RealmResultsChanges<T>>` which can be listened to.

```dart
Expand Down Expand Up @@ -70,7 +88,7 @@
* Added support for opening in-memory realms. ([#280](https://github.com/realm/realm-dart/pull/280))
* Primary key fields no longer required to be `final` in data model classes ([#240](https://github.com/realm/realm-dart/pull/240))

Previously primary key fields needed to be `final`.
Previously primary key fields needed to be `final`.

```dart
@RealmModel()
Expand All @@ -93,7 +111,7 @@

* List fields no longer required to be `final` in data model classes. ([#253](https://github.com/realm/realm-dart/pull/253))

Previously list fields needed to be `final`.
Previously list fields needed to be `final`.

```dart
@RealmModel()
Expand Down Expand Up @@ -127,7 +145,7 @@

**This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.**

### Enhancements
### Enhancements
* Completely rewritten from the ground up with sound null safety and using Dart FFI

### Compatibility
Expand All @@ -136,9 +154,9 @@
0.2.0-alpha.2 Release notes (2022-01-29)
==============================================================

Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.

### Enhancements
### Enhancements
* Completеly rewritten from the ground up with sound null safety and using Dart FFI

### Fixed
Expand All @@ -150,9 +168,9 @@ Notes: This release is a prerelease version. All API's might change without warn
0.2.0-alpha.1 Release notes (2022-01-29)
==============================================================

Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.

### Enhancements
### Enhancements
* Completеly rewritten from the ground up with sound null safety and using Dart FFI

### Fixed
Expand All @@ -167,9 +185,9 @@ Notes: This release is a prerelease version. All API's might change without warn
0.2.0-alpha Release notes (2022-01-27)
==============================================================

Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.

### Enhancements
### Enhancements
* Completеly rewritten from the ground up with sound null safety and using Dart FFI

### Compatibility
Expand Down
Loading