Skip to content

Commit 8f530f6

Browse files
committed
upload mobile builds to SL
1 parent ff19db7 commit 8f530f6

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

.github/workflows/appiumV2_Android.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ on:
44
push:
55
branches:
66
- 3.x
7+
- improve-appium-workflow
78

89
env:
910
CI: true
1011
# Force terminal colors. @see https://www.npmjs.com/package/colors
1112
FORCE_COLOR: 1
13+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
14+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1215

1316
jobs:
1417
appium:
@@ -20,17 +23,23 @@ jobs:
2023
test-suite: ['other', 'quick']
2124

2225
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 }}
26+
- uses: actions/checkout@v4
3627

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

.github/workflows/appiumV2_iOS.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ on:
44
push:
55
branches:
66
- 3.x
7+
- improve-appium-workflow
78

89
env:
910
CI: true
1011
# Force terminal colors. @see https://www.npmjs.com/package/colors
1112
FORCE_COLOR: 1
13+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
14+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1215

1316
jobs:
1417
appium:
@@ -29,8 +32,12 @@ jobs:
2932
env:
3033
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
3134
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 }}
3635

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

0 commit comments

Comments
 (0)