Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jochen-testingbot committed Dec 15, 2023
2 parents 471e382 + 3a32030 commit 61e872c
Show file tree
Hide file tree
Showing 56 changed files with 19,882 additions and 10,704 deletions.
28 changes: 14 additions & 14 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ module.exports = {
semi: ['error', 'always'],
indent: [2, 4],

'no-multiple-empty-lines': [ 2, { 'max': 1, 'maxEOF': 1 } ],
'array-bracket-spacing': [ 'error', 'never' ],
'brace-style': [ 'error', '1tbs', { allowSingleLine: true } ],
camelcase: [ 'error', { properties: 'never' } ],
'comma-spacing': [ 'error', { before: false, after: true } ],
'no-multiple-empty-lines': [2, { 'max': 1, 'maxEOF': 1 }],
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
camelcase: ['error', { properties: 'never' }],
'comma-spacing': ['error', { before: false, after: true }],
'no-lonely-if': 'error',
'no-else-return': 'error',
'no-tabs': 'error',
'no-trailing-spaces': [ 'error', {
'no-trailing-spaces': ['error', {
skipBlankLines: false,
ignoreComments: false,
} ],
quotes: [ 'error', 'single', { avoidEscape: true } ],
'unicode-bom': [ 'error', 'never' ],
'object-curly-spacing': [ 'error', 'always' ],
'keyword-spacing': [ 'error' ],
}],
quotes: ['error', 'single', { avoidEscape: true }],
'unicode-bom': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'keyword-spacing': ['error'],
'require-atomic-updates': 0,
'no-unexpected-multiline': 0,
},
overrides: [ {
files: [ '*.ts' ],
overrides: [{
files: ['*.ts'],
rules: {
// see https://stackoverflow.com/questions/55280555/typescript-eslint-eslint-plugin-error-route-is-defined-but-never-used-no-un
'no-unused-vars': 'off',
Expand All @@ -52,5 +52,5 @@ module.exports = {
// allow overloads
'no-redeclare': 'off',
},
} ],
}],
};
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
time: "11:00"
open-pull-requests-limit: 10
versioning-strategy: increase-if-necessary
99 changes: 99 additions & 0 deletions .github/workflows/e2e-android-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Functional Android App Tests

on:
push:
branches:
- main
pull_request:

jobs:
android-app:
strategy:
matrix:
include:
- chromedriverVersion: "74.0.3729.6"
apiLevel: 30
emuTag: google_apis
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.44"
apiLevel: 28
emuTag: default
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.28"
apiLevel: 25
emuTag: default
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.20"
apiLevel: 23
emuTag: default
arch: x86
profile: Nexus 6P

env:
CI: true
ANDROID_AVD: emulator
APPIUM_TEST_SERVER_PORT: 4723
APPIUM_TEST_SERVER_HOST: 0.0.0.0
_FORCE_LOGS: 1
# No hardware acceleration is available for emulators on Ubuntu:
# https://github.com/marketplace/actions/android-emulator-runner#can-i-use-this-action-on-linux-vms
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: yarn install
- run: |
mkdir apps
wget https://github.com/webdriverio/native-demo-app/releases/download/v0.4.0/Android-NativeDemoApp-0.4.0.apk -P apps
- run: |
npm config set legacy-peer-deps true
npm install -g appium@next
npm install --chromedriver_version="${{ matrix.chromedriverVersion }}"
npm install --no-save mjpeg-consumer
name: Install dev dependencies
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- run: |
cwd=$(pwd)
pushd "$cwd"
cd ~
appium driver install uiautomator2
nohup appium server \
--port=$APPIUM_TEST_SERVER_PORT \
--address=$APPIUM_TEST_SERVER_HOST \
--relaxed-security \
2>&1 > "$cwd/appium.log" &
popd
name: Start Appium server
- run: nohup adb logcat > logcat.log &
name: Capture logcat
- uses: reactivecircus/android-emulator-runner@v2
name: e2e_api${{ matrix.apiLevel }}
with:
script: yarn android.app
avd-name: ${{ env.ANDROID_AVD }}
sdcard-path-or-size: 1500M
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
arch: ${{ matrix.arch }}
profile: ${{ matrix.profile }}
- name: Save logcat output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: logcat-api${{ matrix.apiLevel }}
path: logcat.log
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-api${{ matrix.apiLevel }}
path: appium.log
104 changes: 104 additions & 0 deletions .github/workflows/e2e-android-browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Functional Android Browser Tests

on:
push:
branches:
- main
pull_request:

jobs:
e2e-android-browser:
strategy:
matrix:
include:
- chromedriverVersion: "74.0.3729.6"
apiLevel: 30
emuTag: google_apis
arch: x86
profile: Nexus 6P
- chromedriverVersion: "74.0.3729.6"
apiLevel: 29
emuTag: google_apis
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.44"
apiLevel: 28
emuTag: default
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.28"
apiLevel: 25
emuTag: default
arch: x86
profile: Nexus 6P
- chromedriverVersion: "2.20"
apiLevel: 23
emuTag: default
arch: x86
profile: Nexus 6P

env:
CI: true
ANDROID_AVD: Nexus6P
APPIUM_TEST_SERVER_PORT: 4723
APPIUM_TEST_SERVER_HOST: 0.0.0.0
_FORCE_LOGS: 1
# No hardware acceleration is available for emulators on Ubuntu:
# https://github.com/marketplace/actions/android-emulator-runner#can-i-use-this-action-on-linux-vms
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '.nvmrc'
- run: yarn install
- run: |
mkdir apps
wget https://github.com/webdriverio/native-demo-app/releases/download/v0.4.0/Android-NativeDemoApp-0.4.0.apk -P apps
- run: |
npm config set legacy-peer-deps true
npm install -g appium@next
npm install --chromedriver_version="${{ matrix.chromedriverVersion }}"
npm install --no-save mjpeg-consumer
name: Install dev dependencies
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- run: |
cwd=$(pwd)
pushd "$cwd"
cd ~
appium driver install uiautomator2
nohup appium server \
--port=$APPIUM_TEST_SERVER_PORT \
--address=$APPIUM_TEST_SERVER_HOST \
--relaxed-security \
2>&1 > "$cwd/appium.log" &
popd
name: Start Appium server
- run: nohup adb logcat > logcat.log &
name: Capture logcat
- uses: reactivecircus/android-emulator-runner@v2
name: e2e_api${{ matrix.apiLevel }}
with:
script: yarn android.browser
avd-name: ${{ env.ANDROID_AVD }}
sdcard-path-or-size: 1500M
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
arch: ${{ matrix.arch }}
profile: ${{ matrix.profile }}
- name: Save logcat output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: logcat-api${{ matrix.apiLevel }}
path: logcat.log
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-api${{ matrix.apiLevel }}
path: appium.log
20 changes: 20 additions & 0 deletions .github/workflows/e2e-browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tests e2e Browser

on:
push:
branches:
- main
pull_request:

jobs:
e2e-browser-chrome:
env:
CI: true
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: npm install
- run: npm run browser
76 changes: 76 additions & 0 deletions .github/workflows/e2e-ios-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Tests e2e iOS App

on:
push:
branches:
- main
pull_request:

jobs:
e2e-ios-app:
strategy:
matrix:
include:
- osVersion: '15.2'
os: 'iOS'
model: 'iPhone 13'
env:
CI: true
APPIUM_TEST_SERVER_PORT: 4723
APPIUM_TEST_SERVER_HOST: 127.0.0.1
APPIUM_STARTUP_TIMEOUT_SEC: 30
_FORCE_LOGS: 1
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: futureware-tech/simulator-action@v2
with:
model: ${{ matrix.model }}
os: ${{ matrix.os }}
os_version: ${{ matrix.osVersion }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: yarn install
- run: |
mkdir apps
wget https://github.com/webdriverio/native-demo-app/releases/download/v0.4.0/iOS-Simulator-NativeDemoApp-0.4.0.app.zip -P apps
- run: |
npm config set legacy-peer-deps true
npm install -g appium@next
name: Install dev dependencies
- run: |
cwd=$(pwd)
pushd "$cwd"
cd ~
appium driver install xcuitest
appium driver install safari
nohup appium server \
--port=$APPIUM_TEST_SERVER_PORT \
--address=$APPIUM_TEST_SERVER_HOST \
--relaxed-security \
2>&1 > "$cwd/appium.log" &
popd
name: Start Appium server
- run: |
seconds_started=$(date +%s)
while ! nc -z $APPIUM_TEST_SERVER_HOST $APPIUM_TEST_SERVER_PORT; do
sleep 0.1
seconds_elapsed=$(( $(date +%s) - seconds_started ))
if [[ $seconds_elapsed -gt $APPIUM_STARTUP_TIMEOUT_SEC ]]; then
echo "Appium server was unable to start within $APPIUM_STARTUP_TIMEOUT_SEC seconds timeout"
exit 1
fi
done
name: Wait for Appium server startup
- run: yarn ios.app
name: Run functional tests
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium.log
path: appium.log
- name: Show appium server output
if: ${{ always() }}
run: cat appium.log
Loading

0 comments on commit 61e872c

Please sign in to comment.