@@ -3,63 +3,68 @@ name: Cordova HTTP Plugin CI
33on : [push]
44
55env :
6- nodejs : ' 10.x'
6+ nodejs : " 16.x"
7+ BROWSERSTACK_USERNAME : ${{ secrets.BROWSERSTACK_USERNAME }}
8+ BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
79
810jobs :
911 test-www-interface :
1012 runs-on : ubuntu-latest
1113 steps :
12- - uses : actions/checkout@v1
13- - name : Install Node.js ${{ env.nodejs }}
14- uses : actions/setup-node@v1
15- with :
16- node-version : ${{ env.nodejs }}
17- - name : Install node modules
18- run : npm ci
19- - name : Run WWW interface tests
20- run : npm run testjs
14+ - uses : actions/checkout@v1
15+ - name : Install Node.js ${{ env.nodejs }}
16+ uses : actions/setup-node@v1
17+ with :
18+ node-version : ${{ env.nodejs }}
19+ - name : Install node modules
20+ run : npm ci
21+ - name : Run WWW interface tests
22+ run : npm run testjs
2123
2224 build-ios :
2325 runs-on : macOS-latest
2426 steps :
25- - uses : actions/checkout@v1
26- - name : Install Node.js ${{ env.nodejs }}
27- uses : actions/setup-node@v1
28- with :
29- node-version : ${{ env.nodejs }}
30- - name : Install node modules
31- run : npm ci
32- - name : Update test cert for httpbin.org
33- run : npm run updatecert
34- - name : Build test app
35- run : scripts/build-test-app.sh --ios --emulator
27+ - uses : actions/checkout@v1
28+ - name : Install Node.js ${{ env.nodejs }}
29+ uses : actions/setup-node@v1
30+ with :
31+ node-version : ${{ env.nodejs }}
32+ - name : Install node modules
33+ run : npm ci
34+ - name : Update test cert for httpbin.org
35+ run : npm run updatecert
36+ - name : Build test app
37+ run : scripts/build-test-app.sh --ios --emulator
38+ - name : Upload artifact to BrowserStack
39+ if : env.BROWSERSTACK_USERNAME != ''
40+ run : scripts/upload-browserstack.sh --ios
41+ - name : Run e2e tests
42+ if : env.BROWSERSTACK_USERNAME != ''
43+ run : scripts/test-app.sh --ios --device
3644
3745 build-android :
3846 runs-on : ubuntu-latest
39- env :
40- BROWSERSTACK_USERNAME : ${{ secrets.BROWSERSTACK_USERNAME }}
41- BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
4247 steps :
43- - uses : actions/checkout@v1
44- - name : Install Node.js ${{ env.nodejs }}
45- uses : actions/setup-node@v1
46- with :
47- node-version : ${{ env.nodejs }}
48- - name : Install node modules
49- run : npm ci
50- - name : Install JDK 1.8
51- uses : actions/setup-java@v1
52- with :
53- java-version : 1.8
54- - name : Update test cert for httpbin.org
55- run : npm run updatecert
56- - name : Add workaround for missing DX files in build-tools 31 (https://stackoverflow.com/a/68430992)
57- run : ln -s $ANDROID_HOME/build-tools/31 .0.0/d8 $ANDROID_HOME/build-tools/31 .0.0/dx && ln -s $ANDROID_HOME/build-tools/31 .0.0/lib/d8.jar $ANDROID_HOME/build-tools/31 .0.0/lib/dx.jar
58- - name : Build test app
59- run : scripts/build-test-app.sh --android --device
60- - name : Upload artifact to BrowserStack
61- if : env.BROWSERSTACK_USERNAME != ''
62- run : scripts/upload-browserstack.sh --android
63- - name : Run e2e tests
64- if : env.BROWSERSTACK_USERNAME != ''
65- run : scripts/test-app.sh --android --device
48+ - uses : actions/checkout@v1
49+ - name : Install Node.js ${{ env.nodejs }}
50+ uses : actions/setup-node@v1
51+ with :
52+ node-version : ${{ env.nodejs }}
53+ - name : Install node modules
54+ run : npm ci
55+ - name : Install JDK 1.8
56+ uses : actions/setup-java@v1
57+ with :
58+ java-version : 1.8
59+ - name : Update test cert for httpbin.org
60+ run : npm run updatecert
61+ - name : Add workaround for missing DX files in build-tools 32 (https://stackoverflow.com/a/68430992)
62+ run : ln -s $ANDROID_HOME/build-tools/32 .0.0/d8 $ANDROID_HOME/build-tools/32 .0.0/dx && ln -s $ANDROID_HOME/build-tools/32 .0.0/lib/d8.jar $ANDROID_HOME/build-tools/32 .0.0/lib/dx.jar
63+ - name : Build test app
64+ run : scripts/build-test-app.sh --android --device
65+ - name : Upload artifact to BrowserStack
66+ if : env.BROWSERSTACK_USERNAME != ''
67+ run : scripts/upload-browserstack.sh --android
68+ - name : Run e2e tests
69+ if : env.BROWSERSTACK_USERNAME != ''
70+ run : scripts/test-app.sh --android --device
0 commit comments