Skip to content

Commit

Permalink
chore: update appium version in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Almouro committed Sep 26, 2024
1 parent 9149cf4 commit 1d4af5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@ phases:
- echo "Navigate to test package directory"
- cd $DEVICEFARM_TEST_PACKAGE_PATH
- npm install *.tgz
- export APPIUM_VERSION=1.22.2
- avm $APPIUM_VERSION
- >-
ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium
/usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js
- npm install --global yarn
pre_test:
commands:
- echo "Start appium server"
- >-
appium --log-timestamp --default-capabilities "{\\"deviceName\\":
\\"$DEVICEFARM_DEVICE_NAME\\",
npx appium@2.11.4 --log-timestamp --default-capabilities
"{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\",
\\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\",
\\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\",
\\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}"
Expand Down Expand Up @@ -72,17 +67,12 @@ phases:
- echo "Navigate to test package directory"
- cd $DEVICEFARM_TEST_PACKAGE_PATH
- npm install *.tgz
- export APPIUM_VERSION=1.22.2
- avm $APPIUM_VERSION
- >-
ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium
/usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js
pre_test:
commands:
- echo "Start appium server"
- >-
appium --log-timestamp --default-capabilities "{\\"deviceName\\":
\\"$DEVICEFARM_DEVICE_NAME\\",
npx appium@2.11.4 --log-timestamp --default-capabilities
"{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\",
\\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\",
\\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\",
\\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}"
Expand Down
7 changes: 1 addition & 6 deletions packages/plugins/aws-device-farm/src/buildYmlSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ export const Commands = {
"cd $DEVICEFARM_TEST_PACKAGE_PATH",
"npm install *.tgz",
],
INSTALL_APPIUM: [
"export APPIUM_VERSION=1.22.2",
"avm $APPIUM_VERSION",
"ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js",
],
START_APPIUM: [
'echo "Start appium server"',
`appium --log-timestamp --default-capabilities "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &`,
`npx appium@2.11.4 --log-timestamp --default-capabilities "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &`,
`start_appium_timeout=0;
while [ true ];
do
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/aws-device-farm/src/createTestSpecFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const buildAppiumYmlSpec = (commands: {
installCommands: [
...Commands.INSTALL_NODE,
...Commands.UNPACKAGE_TEST_PACKAGE,
...Commands.INSTALL_APPIUM,
...(commands.installCommands || []),
],
preTestCommands: [...Commands.START_APPIUM, ...(commands.preTestCommands || [])],
Expand Down

0 comments on commit 1d4af5f

Please sign in to comment.