summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins/cordova-plugin-advanced-http/.github/workflows/ci.yml
blob: fcb15cefcbdd3f096bcf00edbf276ef7fe8c5951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Cordova HTTP Plugin CI

on: [push]

env:
  nodejs: '10.x'

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

  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

  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 mipsel reference
      run: sudo mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64
    - 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