mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-01-31 00:00:03 +08:00
chore: fix broken CI build / test
This commit is contained in:
101
.github/workflows/ci.yml
vendored
101
.github/workflows/ci.yml
vendored
@@ -3,63 +3,70 @@ name: Cordova HTTP Plugin CI
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
nodejs: '10.x'
|
||||
nodejs: "16.x"
|
||||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
|
||||
jobs:
|
||||
test-www-interface:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Run WWW interface tests
|
||||
run: npm run testjs
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Run WWW interface tests
|
||||
run: npm run test:js
|
||||
|
||||
build-ios:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Update test cert for httpbin.org
|
||||
run: npm run updatecert
|
||||
- name: Build test app
|
||||
run: scripts/build-test-app.sh --ios --emulator
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Update test cert for httpbin.org
|
||||
run: npm run update:cert
|
||||
# need to find a solution for signing iOS App so we can build for device target instead simulator
|
||||
- name: Build test app
|
||||
run: scripts/build-test-app.sh --ios --emulator
|
||||
- name: Upload artifact to BrowserStack
|
||||
if: env.BROWSERSTACK_USERNAME != ''
|
||||
run: scripts/upload-browserstack.sh --ios
|
||||
# need to have an App for device target
|
||||
# - name: Run e2e tests
|
||||
# if: env.BROWSERSTACK_USERNAME != ''
|
||||
# run: scripts/test-app.sh --ios --device
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Install JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Update test cert for httpbin.org
|
||||
run: npm run updatecert
|
||||
- name: Add workaround for missing DX files in build-tools 31 (https://stackoverflow.com/a/68430992)
|
||||
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
|
||||
- name: Build test app
|
||||
run: scripts/build-test-app.sh --android --device
|
||||
- name: Upload artifact to BrowserStack
|
||||
if: env.BROWSERSTACK_USERNAME != ''
|
||||
run: scripts/upload-browserstack.sh --android
|
||||
- name: Run e2e tests
|
||||
if: env.BROWSERSTACK_USERNAME != ''
|
||||
run: scripts/test-app.sh --android --device
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Node.js ${{ env.nodejs }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.nodejs }}
|
||||
- name: Install node modules
|
||||
run: npm ci
|
||||
- name: Install JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Update test cert for httpbin.org
|
||||
run: npm run update:cert
|
||||
- name: Add workaround for missing DX files in build-tools 32 (https://stackoverflow.com/a/68430992)
|
||||
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
|
||||
- name: Build test app
|
||||
run: scripts/build-test-app.sh --android --device
|
||||
- name: Upload artifact to BrowserStack
|
||||
if: env.BROWSERSTACK_USERNAME != ''
|
||||
run: scripts/upload-browserstack.sh --android
|
||||
- name: Run e2e tests
|
||||
if: env.BROWSERSTACK_USERNAME != ''
|
||||
run: scripts/test-app.sh --android --device
|
||||
|
||||
Reference in New Issue
Block a user