Skip to content

Commit f1e2eb8

Browse files
authored
fix: appium tap and improve appium workflows (#4730)
1 parent 4a1f385 commit f1e2eb8

File tree

8 files changed

+557
-553
lines changed

8 files changed

+557
-553
lines changed

.github/workflows/appiumV2_Android.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
CI: true
1010
# Force terminal colors. @see https://www.npmjs.com/package/colors
1111
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1214

1315
jobs:
1416
appium:
@@ -20,17 +22,23 @@ jobs:
2022
test-suite: ['other', 'quick']
2123

2224
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
- run: npm i --force
29-
env:
30-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
31-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
32-
- run: "npm run test:appium-${{ matrix.test-suite }}"
33-
env: # Or as an environment variable
34-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
35-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
25+
- uses: actions/checkout@v4
3626

27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- run: npm i
33+
env:
34+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
35+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
36+
37+
- name: Upload APK to Sauce Labs
38+
run: |
39+
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
40+
--location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
41+
--form 'payload=@test/data/mobile/selendroid-test-app-0.17.0.apk' \
42+
--form 'name="selendroid-test-app-0.17.0.apk"'
43+
44+
- run: 'npm run test:appium-${{ matrix.test-suite }}'

.github/workflows/appiumV2_iOS.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
CI: true
1010
# Force terminal colors. @see https://www.npmjs.com/package/colors
1111
FORCE_COLOR: 1
12+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
13+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1214

1315
jobs:
1416
appium:
@@ -29,8 +31,12 @@ jobs:
2931
env:
3032
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
3133
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
32-
- run: "npm run test:ios:appium-${{ matrix.test-suite }}"
33-
env: # Or as an environment variable
34-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
35-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
3634

35+
- name: Upload APK to Sauce Labs
36+
run: |
37+
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
38+
--location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
39+
--form 'payload=@test/data/mobile/TestApp-iphonesimulator.zip' \
40+
--form 'name="TestApp-iphonesimulator.zip"'
41+
42+
- run: 'npm run test:ios:appium-${{ matrix.test-suite }}'

0 commit comments

Comments
 (0)