|
| 1 | +name: Functional Tests |
| 2 | + |
| 3 | +on: |
| 4 | + # Run by manual at this time |
| 5 | + workflow_dispatch: |
| 6 | + push: |
| 7 | + branches: [ master ] |
| 8 | + pull_request: |
| 9 | + branches: [ master ] |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + ios_test: |
| 17 | + runs-on: macos-14 |
| 18 | + env: |
| 19 | + XCODE_VERSION: 15.3 |
| 20 | + IOS_VERSION: 17.4 |
| 21 | + IOS_DEVICE_NAME: iPhone 15 Plus |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v3 |
| 25 | + |
| 26 | + - name: Install Node.js |
| 27 | + uses: actions/setup-node@v3 |
| 28 | + with: |
| 29 | + node-version: 'lts/*' |
| 30 | + |
| 31 | + - name: Select Xcode |
| 32 | + uses: maxim-lobanov/setup-xcode@v1 |
| 33 | + with: |
| 34 | + xcode-version: ${{ env.XCODE_VERSION }} |
| 35 | + - run: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false |
| 36 | + |
| 37 | + - uses: futureware-tech/simulator-action@v3 |
| 38 | + with: |
| 39 | + # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md |
| 40 | + model: ${{ env.IOS_DEVICE_NAME }} |
| 41 | + os_version: ${{ env.IOS_VERSION }} |
| 42 | + |
| 43 | + - name: Preparing other environment |
| 44 | + run: | |
| 45 | + brew install ffmpeg |
| 46 | + brew tap wix/brew |
| 47 | + brew install applesimutils |
| 48 | +
|
| 49 | + # Start Appium |
| 50 | + - name: Install appium and mjpeg-consumer |
| 51 | + run: | |
| 52 | + npm install -g appium |
| 53 | + npm install -g mjpeg-consumer |
| 54 | + - run: | |
| 55 | + appium driver install xcuitest |
| 56 | + appium plugin install images@2.1.8 |
| 57 | + appium plugin install execute-driver |
| 58 | + nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors --base-path=/wd/hub > appium.log & |
| 59 | +
|
| 60 | + - name: Set up Ruby |
| 61 | + uses: ruby/setup-ruby@v1 |
| 62 | + with: |
| 63 | + ruby-version: 3.2 |
| 64 | + - run: | |
| 65 | + bundle install |
| 66 | + rake ios |
| 67 | + name: Run tests |
| 68 | + working-directory: ios_tests |
| 69 | +
|
| 70 | + - name: Save server output |
| 71 | + if: ${{ always() }} |
| 72 | + uses: actions/upload-artifact@master |
| 73 | + with: |
| 74 | + name: appium-ios_test_with_other_deps.log |
| 75 | + path: | |
| 76 | + appium.log |
| 77 | + test/report/ |
0 commit comments