Skip to content

Commit

Permalink
Skip integration test if runtime bridge was not changed (#427)
Browse files Browse the repository at this point in the history
* ci: skip

* ci: skip on android

* chore: test commit

* chore: undo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
jkoenig134 and mergify[bot] authored Feb 4, 2025
1 parent 82e58df commit 1d8d352
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/runtime_bridge_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ jobs:
runs-on: imhotep
steps:
- uses: actions/checkout@v4
- name: Get changed files of the enmeshed_runtime_bridge package
id: changed-enmeshed_runtime_bridge-files
uses: tj-actions/changed-files@v45
with:
files: packages/enmeshed_runtime_bridge/**
- name: Start Backbone
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: docker compose -f .dev/compose.backbone.yml --env-file .dev/compose.backbone.env up -d
- name: "List all simulators"
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: "xcrun xctrace list devices"
- name: "Start Simulator"
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
# the command "xcrun simctl boot" expects a device identifier
# the assignment of the UDID variable consists of retrieving the ID of the simulator
# by extracting it from the command "xcrun xctrace list devices"
Expand All @@ -41,14 +49,17 @@ jobs:
fi
fi
- name: Setup Flutter SDK
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install Dependencies
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: |
dart pub global activate melos
melos bootstrap
- name: Run integration tests
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: cd packages/enmeshed_runtime_bridge/integration_test_runner && flutter test integration_test/suite_test.dart --dart-define=app_baseUrl=http://localhost:8090 --dart-define=app_clientId=test --dart-define=app_clientSecret=test
- name: Stop Backbone
run: docker compose -f .dev/compose.backbone.yml --env-file .dev/compose.backbone.env down -v
Expand All @@ -58,28 +69,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files of the enmeshed_runtime_bridge package
id: changed-enmeshed_runtime_bridge-files
uses: tj-actions/changed-files@v45
with:
files: packages/enmeshed_runtime_bridge/**
- name: Start Backbone
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: docker compose -f .dev/compose.backbone.yml --env-file .dev/compose.backbone.env up -d
- name: Setup Java
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
cache: "gradle"
- name: Setup Flutter SDK
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install Dependencies
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: |
dart pub global activate melos
melos bootstrap
- name: Enable KVM group perms
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Start emulator and run tests
if: steps.changed-enmeshed_runtime_bridge-files.outputs.any_changed == 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
target: playstore
Expand Down

0 comments on commit 1d8d352

Please sign in to comment.