-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use baasaas on CI * Remove dependency on realm in the baas client * Regenerate models * Cleanup containers after test runs * Fix CI * Try setting the baas url correctly * Fix order of test setup * .. * Add some missing flutter tests * Try to fix flutter tests * Rework indexed test to use values from the second half of the table. * Use api key auth * Post-merge fixes * Use endpoints, wire-up differentiator tag * Guard against incomplete containers * Fix cleanup workflow; fix env variable names * Don't log isolate warnings when the isolate is created by dart test * Pass correct differentiator to android tests * Always run cleanup * Rework cleanup command * Use reporter * Don't fail test run on test errors * Fail on error * Remove failing test * Update lib/src/cli/atlas_apps/options.dart Co-authored-by: Kasper Overgård Nielsen <[email protected]> * Support maps (#1406) * Update generator to support maps * Generator updates * Better error message for wrong key type * Remove the default value lists * Add tests for non-empty default collection initializers * Wire up some of the implementation * Wire up most of the test infrastructure * Add notification tests * Fix generator test expects * Fix tests * Add changelog, clean up the generator a little * Revert some unneeded changes * Fix expectations --------- Co-authored-by: Nikola Irinchev <[email protected]> * Merge main, regenerate cli --------- Co-authored-by: Kasper Overgård Nielsen <[email protected]>
- Loading branch information
Showing
23 changed files
with
866 additions
and
853 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,30 +15,21 @@ on: | |
description: Architecture to execute on. | ||
required: false | ||
type: string | ||
app: | ||
description: App name prefix. | ||
required: true | ||
type: string | ||
cluster: | ||
description: Cluster name to deploy. | ||
differentiator: | ||
description: Differentiator for the BaaS container. | ||
required: true | ||
type: string | ||
|
||
env: | ||
BAAS_URL: ${{ secrets.REALM_QA_URL }} | ||
BAAS_API_KEY: ${{ secrets.ATLAS_QA_PUBLIC_API_KEY }} | ||
BAAS_PRIVATE_API_KEY: ${{ secrets.ATLAS_QA_PRIVATE_API_KEY }} | ||
BAAS_PROJECT_ID: ${{ secrets.ATLAS_QA_PROJECT_ID}} | ||
REALM_CI: true | ||
BAAS_BAASAAS_API_KEY: ${{ secrets.BAASAAS_API_KEY}} | ||
BAAS_DIFFERENTIATOR: ${{ inputs.differentiator }} | ||
|
||
jobs: | ||
dart-tests: | ||
runs-on: ${{ inputs.runner }} | ||
name: Dart tests on ${{inputs.os }} ${{ inputs.architecture }} | ||
timeout-minutes: 45 | ||
env: | ||
BAAS_CLUSTER: ${{ inputs.cluster }} | ||
BAAS_DIFFERENTIATOR: ${{ inputs.app }}${{ github.run_id }}${{ github.run_attempt }} | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -68,20 +59,17 @@ jobs: | |
run: ulimit -n 10240 | ||
if: ${{ contains(inputs.os, 'macos') }} | ||
|
||
# This will be a no-op under normal circumstances since the cluster would have been deployed | ||
# in deploy-cluster. It is needed in case we want to re-run the job after the cluster has been reaped. | ||
- name: Create cluster | ||
uses: realm/ci-actions/mdb-realm/deploy@338bf3e7575015a28faec8b67614385d122aece7 | ||
with: | ||
realmUrl: ${{ env.BAAS_URL }} | ||
atlasUrl: ${{ secrets.ATLAS_QA_URL }} | ||
projectId: ${{ env.BAAS_PROJECT_ID }} | ||
apiKey: ${{ env.BAAS_API_KEY }} | ||
privateApiKey: ${{ env.BAAS_PRIVATE_API_KEY }} | ||
clusterName: ${{ env.BAAS_CLUSTER }} | ||
|
||
- name: Run tests | ||
run: ${{ inputs.architecture == 'arm' && 'arch -arm64 ' || '' }}dart test -r expanded --coverage ./coverage/ -j 1 --test-randomize-ordering-seed random | ||
run: ${{ inputs.architecture == 'arm' && 'arch -arm64 ' || '' }}dart test -r expanded --coverage ./coverage/ -j 1 --test-randomize-ordering-seed random --file-reporter="json:test-results.json" || true | ||
|
||
- name: Publish Test Report | ||
uses: dorny/[email protected] | ||
if: success() || failure() | ||
with: | ||
name: Test Results Dart ${{ inputs.os }} ${{ inputs.architecture }} | ||
path: test-results.json | ||
reporter: dart-json | ||
only-summary: true | ||
|
||
# we're pruning generated files, the cli folder, as well as realm_bindings.dart from our coverage reports | ||
- name: Generate realm_dart coverage report | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy BaaS and apps | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
differentiator: | ||
description: Differentiator for the BaaS container. | ||
required: true | ||
type: string | ||
|
||
env: | ||
REALM_CI: true | ||
|
||
jobs: | ||
deploy-baas: | ||
runs-on: ubuntu-latest | ||
name: Deploy BaaS | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 | ||
with: | ||
submodules: false | ||
|
||
- name : Setup Dart SDK | ||
uses: dart-lang/setup-dart@main | ||
with: | ||
sdk: stable | ||
architecture: 'x64' | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Deploy cluster and apps | ||
run: dart run realm_dart deploy-apps --baasaas-api-key ${{ secrets.BAASAAS_API_KEY }} --differentiator ${{ inputs.differentiator }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Terminate BaaS | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
differentiator: | ||
description: Differentiator for the BaaS container. | ||
required: true | ||
type: string | ||
|
||
env: | ||
REALM_CI: true | ||
|
||
jobs: | ||
terminate-baas: | ||
runs-on: ubuntu-latest | ||
name: Terminate BaaS | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 | ||
with: | ||
submodules: false | ||
|
||
- name : Setup Dart SDK | ||
uses: dart-lang/setup-dart@main | ||
with: | ||
sdk: stable | ||
architecture: 'x64' | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Terminate baas | ||
run: dart run realm_dart delete-apps --baasaas-api-key ${{ secrets.BAASAAS_API_KEY }} --differentiator ${{ inputs.differentiator }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.