Skip to content

Commit c559d4e

Browse files
authored
Merge pull request #282 from AirtestProject/dev
Dev
2 parents c0bf130 + a4162e2 commit c559d4e

File tree

353 files changed

+4246
-2154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+4246
-2154
lines changed

.azure-pipelines.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml
22
variables:
3-
MIN_VM_IMAGE: macOS-12
4-
MIN_XCODE_VERSION: 13.1
5-
MIN_PLATFORM_VERSION: 15.0
6-
MIN_TV_PLATFORM_VERSION: 15.0
7-
MIN_TV_DEVICE_NAME: Apple TV 4K (2nd generation)
8-
MIN_IPHONE_DEVICE_NAME: iPhone 11
9-
MIN_IPAD_DEVICE_NAME: iPad Pro (11-inch) (3rd generation)
10-
MAX_VM_IMAGE: macOS-12
11-
MAX_XCODE_VERSION: 14.2
12-
MAX_PLATFORM_VERSION: 16.2
13-
MAX_PLATFORM_VERSION_TV: 16.1
14-
MAX_IPHONE_DEVICE_NAME: iPhone 13
15-
MAX_TV_DEVICE_NAME: Apple TV 4K (2nd generation)
16-
MAX_IPAD_DEVICE_NAME: iPad Pro (11-inch) (3rd generation)
3+
MIN_VM_IMAGE: macOS-13
4+
MIN_XCODE_VERSION: 14.3.1
5+
MIN_PLATFORM_VERSION: 16.4
6+
MIN_TV_PLATFORM_VERSION: 16.4
7+
MIN_TV_DEVICE_NAME: Apple TV 4K (3rd generation)
8+
MIN_IPHONE_DEVICE_NAME: iPhone 14 Plus
9+
MIN_IPAD_DEVICE_NAME: iPad Pro (11-inch) (4th generation)
10+
MAX_VM_IMAGE: macOS-14
11+
MAX_XCODE_VERSION: 15.4
12+
MAX_PLATFORM_VERSION: 17.5
13+
MAX_PLATFORM_VERSION_TV: 17.5
14+
MAX_IPHONE_DEVICE_NAME: iPhone 15 Plus
15+
MAX_TV_DEVICE_NAME: Apple TV 4K (3rd generation)
16+
MAX_IPAD_DEVICE_NAME: iPad Air 11-inch (M2)
1717
DEFAULT_NODE_VERSION: "18.x"
1818

1919
trigger:

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/functional-test.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,60 @@ name: Functional Tests
22

33
on: [pull_request]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
7+
cancel-in-progress: true
58

69
jobs:
710
test:
8-
env:
9-
CI: true
10-
_FORCE_LOGS: 1
11-
XCODE_VERSION: 13.4
12-
DEVICE_NAME: iPhone 11
13-
PLATFORM_VERSION: 15.5
14-
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
15-
runs-on: macos-12
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
test_targets:
15+
- HOST_OS: 'macos-15'
16+
XCODE_VERSION: '26.0'
17+
IOS_VERSION: '26.0'
18+
IOS_MODEL: iPhone 17
19+
- HOST_OS: 'macos-15'
20+
XCODE_VERSION: '16.4'
21+
IOS_VERSION: '18.4'
22+
IOS_MODEL: iPhone 16 Plus
23+
- HOST_OS: 'macos-14'
24+
XCODE_VERSION: '15.4'
25+
IOS_VERSION: '17.5'
26+
IOS_MODEL: iPhone 15 Plus
27+
28+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
29+
runs-on: ${{matrix.test_targets.HOST_OS}}
1630
steps:
1731
- uses: actions/checkout@v3
1832
- uses: actions/setup-node@v3
1933
with:
2034
node-version: lts/*
2135
- uses: maxim-lobanov/setup-xcode@v1
2236
with:
23-
xcode-version: "${{ env.XCODE_VERSION }}"
37+
xcode-version: ${{matrix.test_targets.XCODE_VERSION}}
2438
- run: |
2539
npm install
2640
mkdir -p ./Resources/WebDriverAgent.bundle
2741
name: Install dev dependencies
2842
29-
- run: |
30-
target_sim_id=$(xcrun simctl list devices available | grep "$DEVICE_NAME (" | cut -d "(" -f2 | cut -d ")" -f1)
43+
- name: Prepare iOS simulator
44+
env:
45+
DEVICE_NAME: ${{matrix.test_targets.IOS_MODEL}}
46+
PLATFORM_VERSION: ${{matrix.test_targets.IOS_VERSION}}
47+
run: |
3148
open -Fn "$(xcode-select -p)/Applications/Simulator.app"
32-
xcrun simctl bootstatus $target_sim_id -b
33-
name: Preboot Simulator
49+
udid=$(xcrun simctl list devices available -j | \
50+
node -p "Object.entries(JSON.parse(fs.readFileSync(0)).devices).filter((x) => x[0].includes('$PLATFORM_VERSION'.replace('.', '-'))).reduce((acc, x) => [...acc, ...x[1]], []).find(({name}) => name === '$DEVICE_NAME').udid")
51+
xcrun simctl bootstatus $udid -b
52+
xcrun simctl shutdown $udid
3453
3554
- run: npm run e2e-test
3655
name: Run functional tests
56+
env:
57+
CI: true
58+
_FORCE_LOGS: 1
59+
_LOG_TIMESTAMP: 1
60+
DEVICE_NAME: ${{matrix.test_targets.IOS_MODEL}}
61+
PLATFORM_VERSION: ${{matrix.test_targets.IOS_VERSION}}

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: https://www.conventionalcommits.org
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: beemojs/conventional-pr-action@v2
11+
- uses: beemojs/conventional-pr-action@v3
1212
with:
1313
config-preset: angular
1414
env:

.github/workflows/publish.js.yml

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@ on:
88
push:
99
branches: [ master ]
1010

11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
issues: write
15+
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
16+
1117
jobs:
1218
build:
13-
runs-on: macos-13
19+
runs-on: macos-15
1420

1521
env:
16-
XCODE_VERSION: 14.3.1
17-
ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip"
18-
PKG_PATH_IOS: "appium_wda_ios"
19-
ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip"
20-
PKG_PATH_TVOS: "appium_wda_tvos"
22+
XCODE_VERSION: 16.3
23+
# Available destination for simulators depend on Xcode version.
24+
DESTINATION_SIM: platform=iOS Simulator,name=iPhone 16 Plus
25+
DESTINATION_SIM_TVOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
2126

2227
steps:
2328
- uses: actions/checkout@v2
@@ -36,41 +41,62 @@ jobs:
3641
name: Run test
3742

3843
# building WDA packages
39-
- name: Build iOS
40-
run: |
41-
xcodebuild clean build-for-testing \
42-
-project WebDriverAgent.xcodeproj \
43-
-derivedDataPath $PKG_PATH_IOS \
44-
-scheme WebDriverAgentRunner \
45-
-destination generic/platform=iOS \
46-
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
47-
- name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS after removing test frameworks
48-
run: |
49-
pushd appium_wda_ios/Build/Products/Debug-iphoneos
50-
rm -rf WebDriverAgentRunner-Runner.app/Frameworks/XC*.framework
51-
zip -r $ZIP_PKG_NAME_IOS WebDriverAgentRunner-Runner.app
52-
popd
53-
mv $PKG_PATH_IOS/Build/Products/Debug-iphoneos/$ZIP_PKG_NAME_IOS ./
54-
- name: Build tvOS
55-
run: |
56-
xcodebuild clean build-for-testing \
57-
-project WebDriverAgent.xcodeproj \
58-
-derivedDataPath $PKG_PATH_TVOS \
59-
-scheme WebDriverAgentRunner_tvOS \
60-
-destination generic/platform=tvOS \
61-
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
62-
- name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS after removing test frameworks
63-
run: |
64-
pushd appium_wda_tvos/Build/Products/Debug-appletvos
65-
rm -rf WebDriverAgentRunner_tvOS-Runner.app/Frameworks/XC*.framework
66-
zip -r $ZIP_PKG_NAME_TVOS WebDriverAgentRunner_tvOS-Runner.app
67-
popd
68-
mv $PKG_PATH_TVOS/Build/Products/Debug-appletvos/$ZIP_PKG_NAME_TVOS ./
44+
- name: Building iOS
45+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-real.sh
46+
env:
47+
DERIVED_DATA_PATH: appium_wda_ios
48+
SCHEME: WebDriverAgentRunner
49+
DESTINATION: generic/platform=iOS
50+
WD: appium_wda_ios/Build/Products/Debug-iphoneos
51+
ZIP_PKG_NAME: WebDriverAgentRunner-Runner.zip
52+
- name: Building tvOS
53+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-real.sh
54+
env:
55+
DERIVED_DATA_PATH: appium_wda_tvos
56+
SCHEME: WebDriverAgentRunner_tvOS
57+
DESTINATION: generic/platform=tvOS
58+
WD: appium_wda_tvos/Build/Products/Debug-appletvos
59+
ZIP_PKG_NAME: WebDriverAgentRunner_tvOS-Runner.zip
60+
- name: Building iOS sim arm64
61+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
62+
env:
63+
DERIVED_DATA_PATH: appium_wda_ios_sim_arm64
64+
SCHEME: WebDriverAgentRunner
65+
DESTINATION: ${{ env.DESTINATION_SIM }}
66+
WD: appium_wda_ios_sim_arm64/Build/Products/Debug-iphonesimulator
67+
ZIP_PKG_NAME: WebDriverAgentRunner-Build-Sim-arm64.zip
68+
ARCHS: arm64
69+
- name: Building iOS sim x86_64
70+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
71+
env:
72+
DERIVED_DATA_PATH: appium_wda_ios_sim_x86_64
73+
SCHEME: WebDriverAgentRunner
74+
DESTINATION: ${{ env.DESTINATION_SIM }}
75+
WD: appium_wda_ios_sim_x86_64/Build/Products/Debug-iphonesimulator
76+
ZIP_PKG_NAME: WebDriverAgentRunner-Build-Sim-x86_64.zip
77+
ARCHS: x86_64
78+
- name: Building tvOS sim arm64
79+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
80+
env:
81+
DERIVED_DATA_PATH: appium_wda_tvos_sim_arm64
82+
SCHEME: WebDriverAgentRunner_tvOS
83+
DESTINATION: ${{ env.DESTINATION_SIM_TVOS }}
84+
WD: appium_wda_tvos_sim_arm64/Build/Products/Debug-appletvsimulator
85+
ZIP_PKG_NAME: WebDriverAgentRunner_tvOS-Build-Sim-arm64.zip
86+
ARCHS: arm64
87+
- name: Building tvOS sim x86_64
88+
run: sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
89+
env:
90+
DERIVED_DATA_PATH: appium_wda_tvos_sim_x86_64
91+
SCHEME: WebDriverAgentRunner_tvOS
92+
DESTINATION: ${{ env.DESTINATION_SIM_TVOS }}
93+
WD: appium_wda_tvos_sim_x86_64/Build/Products/Debug-appletvsimulator
94+
ZIP_PKG_NAME: WebDriverAgentRunner_tvOS-Build-Sim-x86_64.zip
95+
ARCHS: x86_64
6996

7097
# release tasks
7198
- run: npx semantic-release
7299
env:
73100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
75101
name: Release
76102

.github/workflows/unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
prepare_matrix:
88
runs-on: ubuntu-latest
99
outputs:
10-
versions: ${{ steps.generate-matrix.outputs.versions }}
10+
versions: ${{ steps.generate-matrix.outputs.lts }}
1111
steps:
12-
- name: Select 3 most recent LTS versions of Node.js
12+
- name: Select all current LTS versions of Node.js
1313
id: generate-matrix
14-
run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT"
14+
uses: msimerson/node-lts-versions@v1
1515

1616
test:
1717
needs:

.github/workflows/wda-package.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
- completed
99

1010
env:
11-
HOST: macos-13
12-
XCODE_VERSION: 14.3.1
13-
DESTINATION_SIM: platform=iOS Simulator,name=iPhone 14 Pro
14-
DESTINATION_SIM_tvOS: platform=tvOS Simulator,name=Apple TV
11+
HOST: macos-15
12+
XCODE_VERSION: 16.3
13+
DESTINATION_SIM: platform=iOS Simulator,name=iPhone 16 Plus
14+
DESTINATION_SIM_tvOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
1515

1616
jobs:
1717
host_machine:
@@ -29,12 +29,14 @@ jobs:
2929
runs-on: ${{ needs.host_machine.outputs.host }}
3030

3131
env:
32+
PKG_NAME_IOS: "WebDriverAgentRunner-Runner"
3233
ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip"
34+
PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner"
3335
ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip"
3436

3537
steps:
3638
- name: Checkout
37-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
3840
- uses: maxim-lobanov/setup-xcode@v1
3941
with:
4042
xcode-version: "${{ env.XCODE_VERSION }}"
@@ -57,12 +59,14 @@ jobs:
5759
ZIP_PKG_NAME: "${{ env.ZIP_PKG_NAME_TVOS }}"
5860

5961
- name: Upload the built generic app package for iOS
60-
uses: actions/upload-artifact@v3.1.0
62+
uses: actions/upload-artifact@master
6163
with:
64+
name: "${{ env.PKG_NAME_IOS }}"
6265
path: "${{ env.ZIP_PKG_NAME_IOS }}"
6366
- name: Upload the built generic app package for tvOS
64-
uses: actions/upload-artifact@v3.1.0
67+
uses: actions/upload-artifact@master
6568
with:
69+
name: "${{ env.PKG_NAME_TVOS }}"
6670
path: "${{ env.ZIP_PKG_NAME_TVOS }}"
6771

6872
for_simulator_devices:
@@ -72,9 +76,19 @@ jobs:
7276

7377
strategy:
7478
matrix:
75-
# '' is for iOS
76-
target: ['', '_tvOS']
77-
arch: [x86_64, arm64]
79+
include:
80+
- target: ''
81+
arch: x86_64
82+
simulator_name: Debug-iphonesimulator
83+
- target: ''
84+
arch: arm64
85+
simulator_name: Debug-iphonesimulator
86+
- target: '_tvOS'
87+
arch: x86_64
88+
simulator_name: Debug-appletvsimulator
89+
- target: '_tvOS'
90+
arch: arm64
91+
simulator_name: Debug-appletvsimulator
7892
steps:
7993
- name: Checkout
8094
uses: actions/checkout@v3
@@ -85,11 +99,13 @@ jobs:
8599
run: |
86100
DESTINATION=$DESTINATION_SIM${{ matrix.target }} sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
87101
env:
88-
TARGET: ${{ matrix.target }}
89102
SCHEME: WebDriverAgentRunner${{ matrix.target }}
90103
ARCHS: ${{ matrix.arch }}
91104
ZIP_PKG_NAME: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip"
105+
DERIVED_DATA_PATH: wda_build
106+
WD: wda_build/Build/Products/${{ matrix.simulator_name }}
92107
- name: Upload the built generic app package for WebDriverAgentRunner${{ matrix.target }} with ${{ matrix.arch }}
93-
uses: actions/upload-artifact@v3.1.0
108+
uses: actions/upload-artifact@master
94109
with:
110+
name: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}"
95111
path: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip"

.releaserc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
["@semantic-release/github", {
3636
"assets": [
3737
"WebDriverAgentRunner-Runner.zip",
38-
"WebDriverAgentRunner_tvOS-Runner.zip"
38+
"WebDriverAgentRunner_tvOS-Runner.zip",
39+
"WebDriverAgentRunner-Build-Sim-arm64.zip",
40+
"WebDriverAgentRunner-Build-Sim-x86_64.zip",
41+
"WebDriverAgentRunner_tvOS-Build-Sim-arm64.zip",
42+
"WebDriverAgentRunner_tvOS-Build-Sim-x86_64.zip"
3943
]}]
4044
]
4145
}

0 commit comments

Comments
 (0)