Skip to content

Commit

Permalink
feat(CI): use bam version of maestro
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeEgret committed Aug 7, 2023
1 parent 2e9102c commit df5aa3c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ios_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/bin/bash

curl -Ls "https://get.maestro.mobile.dev" | bash
export PATH="$PATH":"$HOME/.maestro/bin"
brew tap facebook/fb
brew install facebook/fb/idb-companion

git clone https://github.com/bamlab/maestro.git
cd maestro
git checkout feat/prevent-driver-uninstall-ios
git submodule update --init
./gradlew distZip && unzip -o maestro-cli/build/distributions/maestro.zip -d dist
cd ..

export PATH=$PATH:$(pwd)/maestro/dist/maestro/bin

yarn tsc --build && yarn workspace @perf-profiler/web-reporter build
npx link-lerna-package-binaries

Expand All @@ -22,6 +29,10 @@ echo $UDID
# Install the app
xcrun simctl install $UDID ./.github/workflows/fakeStore.app

maestro initDriver

sleep 5

# Launch the app
# xcrun simctl launch $UDID $APPID

Expand Down
17 changes: 5 additions & 12 deletions packages/ios-poc/src/launchIOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,14 @@ const launchTest = async ({
- launchApp
`
);
try {
execSync(`maestro test ${lauchAppFile} --no-ansi`, {
stdio: "inherit",
});
} catch (e) {
console.log("Error while launching app: ", e);
execSync(`maestro test ${lauchAppFile} --no-ansi`, {
stdio: "inherit",
});
}
execSync(`maestro test ${lauchAppFile} --no-ansi --skipDriverSetup`, {
stdio: "inherit",
});
const recordingPromise = startRecord(simulatorId, traceFile);
execSync(`sleep 2`, {
stdio: "inherit",
});
execSync(`${testCommand} --no-ansi`, {
execSync(`${testCommand} --no-ansi --skipDriverSetup`, {
stdio: "inherit",
});
const stopAppFile = writeTmpFile(
Expand All @@ -104,7 +97,7 @@ const launchTest = async ({
- stopApp
`
);
execSync(`maestro test ${stopAppFile} --no-ansi`, {
execSync(`maestro test ${stopAppFile} --no-ansi --skipDriverSetup`, {
stdio: "inherit",
});
try {
Expand Down

0 comments on commit df5aa3c

Please sign in to comment.