From 71c875ea315aba83138d4b8f3fd6ef0f9078daec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:29:51 -0600 Subject: [PATCH] chore(appium): try using two workflows to improve speed on test --- .github/workflows/ui-automated-tests.yml | 420 +------------------ .github/workflows/ui-automated-windows.yml | 456 +++++++++++++++++++++ config/wdio.mac.chatA.conf.ts | 1 - config/wdio.mac.chatB.conf.ts | 1 - config/wdio.mac.ci.conf.ts | 7 +- 5 files changed, 463 insertions(+), 422 deletions(-) create mode 100644 .github/workflows/ui-automated-windows.yml diff --git a/.github/workflows/ui-automated-tests.yml b/.github/workflows/ui-automated-tests.yml index 786b1745640..f5b2e77781b 100644 --- a/.github/workflows/ui-automated-tests.yml +++ b/.github/workflows/ui-automated-tests.yml @@ -71,64 +71,6 @@ jobs: Failed Automated Test type: add - build-windows: - runs-on: - labels: windows-latest - - steps: - - name: Checkout testing directory ๐Ÿ”– - uses: actions/checkout@v3 - with: - repository: Satellite-im/Uplink - - - name: Install Rust ๐Ÿ’ฟ - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.70.0 - override: true - components: rustfmt, clippy - - - name: Build executable ๐Ÿ–ฅ๏ธ - run: cargo build --release -F production_mode - continue-on-error: true - - - name: Create ZIP archive on Windows ๐Ÿ—ณ๏ธ - run: Compress-Archive -Path target/release/uplink.exe -Destination uplinkWindows.zip - - - name: Copy Extensions ๐Ÿ—ณ๏ธ - run: | - mkdir ./ui/extra/extensions - cp -r ./target/release/emoji_selector.d ./ui/extra/extensions/ - cp -r ./target/release/emoji_selector.dll ./ui/extra/extensions/ - cp -r ./target/release/emoji_selector.dll.exp ./ui/extra/extensions/ - cp -r ./target/release/emoji_selector.dll.lib ./ui/extra/extensions/ - cp -r ./target/release/emoji_selector.pdb ./ui/extra/extensions/ - - - name: Upload Executable โฌ†๏ธ - uses: actions/upload-artifact@v3 - with: - name: Uplink-windows-latest - path: uplinkWindows.zip - - - name: Upload Windows Assets - uses: actions/upload-artifact@v3 - with: - name: uplink-windows-assets - path: | - ui/extra/images/ - ui/extra/prism_langs/ - ui/extra/themes/ - ui/extra/extensions/ - - - name: Add label if any of build jobs failed - if: failure() - uses: buildsville/add-remove-label@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - labels: | - Failed Automated Test - type: add - test-mac: needs: build-mac runs-on: macos-13 @@ -319,7 +261,7 @@ jobs: name: Delete Cache Folder and copy reusable data for ${{ matrix.username }} run: | rm -rf ~/.uplink - cp -r ./testing-uplink/tests/fixtures/users/${{ matrix.username }}/ ~/.uplink + cp -r ./tests/fixtures/users/${{ matrix.username }}/. ~/.uplink - name: Show if data was copied correctly working-directory: ~/.uplink @@ -367,364 +309,12 @@ jobs: Failed Automated Test type: add - test-windows-chats: - needs: build-windows - runs-on: windows-latest - - steps: - - name: Checkout testing directory ๐Ÿ”– - uses: actions/checkout@v3 - - - name: Change resolution on Windows Runner - run: Set-DisplayResolution -Width 1920 -Height 1080 -Force - shell: powershell - - - name: Download the Windows app ๐Ÿ—ณ๏ธ - uses: actions/download-artifact@v3 - with: - name: Uplink-windows-latest - path: ./apps - - - name: Extract .zip into apps Directory ๐Ÿ—ณ๏ธ - run: Expand-Archive -Path ./apps/uplinkWindows.zip -DestinationPath ./apps - - - name: Download the Windows app assets - uses: actions/download-artifact@v3 - with: - name: uplink-windows-assets - path: ./apps - - - name: Copy app to have two instances ๐Ÿ’ฟ - working-directory: ./apps - run: | - cp -r ./uplink.exe ./uplink2.exe - - - name: Move Windows assets to correct locations ๐Ÿ’ฟ - working-directory: ./apps - run: | - mkdir ./bin/extra - mkdir ./extra - mv ./uplink.exe ./bin/ - mv ./uplink2.exe ./bin/ - mv ./images/ ./bin/extra/ - mv ./prism_langs/ ./bin/extra/ - mv ./themes/ ./extra/ - - - name: Setup Node.js ๐Ÿ”จ - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "npm" - - - name: Cache NPM dependencies ๐Ÿ”จ - uses: actions/cache@v3 - id: cache-windows-chats - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - - - name: Install NPM dependencies ๐Ÿ“ฆ - if: steps.cache-windows-chats.outputs.cache-hit != 'true' - run: npm ci - - - name: Install Appium Server ๐Ÿ’ป - run: | - npm install -g appium@next - appium -v - - - name: Install Appium Driver ๐Ÿ’ป - run: | - appium driver install --source=npm appium-windows-driver - appium driver list - - - name: Setup FFMPEG to record screen - uses: FedericoCarboni/setup-ffmpeg@v2 - id: setup-ffmpeg - - - name: Delete Cache Folder if exists - Windows - run: If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break } - shell: powershell - - - name: Run Chat Tests on Windows ๐Ÿงช - run: npm run windows.multiremote - - - name: Upload Test Report - Windows Chats - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-report-windows-chats - path: ./test-report/*.xml - - - name: Upload Allure Test Results - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-allure-windows-chats - path: ./allure-results/ - - - name: Upload Screenshots for Windows - Chats ๐Ÿ“ท - uses: actions/upload-artifact@v3 - if: failure() - with: - name: appium-screenshots-windows-chats - path: ./test-results - - - name: Upload Appium Log for Windows - Chats ๐Ÿ“ท - uses: actions/upload-artifact@v3 - if: failure() - with: - name: appium-log-windows-chats - path: | - ./appium.log - - - name: Add label if any of test jobs failed - if: failure() - uses: buildsville/add-remove-label@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - labels: | - Failed Automated Test - type: add - - test-windows: - needs: build-windows - runs-on: windows-latest - - steps: - - name: Checkout testing directory ๐Ÿ”– - uses: actions/checkout@v3 - - - name: Change resolution on Windows Runner - run: Set-DisplayResolution -Width 1920 -Height 1080 -Force - shell: powershell - - - name: Download the Windows app ๐Ÿ—ณ๏ธ - uses: actions/download-artifact@v3 - with: - name: Uplink-windows-latest - path: ./apps - - - name: Extract .zip into apps Directory ๐Ÿ—ณ๏ธ - run: Expand-Archive -Path ./apps/uplinkWindows.zip -DestinationPath ./apps - - - name: Download the Windows app assets - uses: actions/download-artifact@v3 - with: - name: uplink-windows-assets - path: ./apps - - - name: Move Windows assets to correct locations ๐Ÿ’ฟ - working-directory: ./apps - run: | - mkdir ./bin/extra - mkdir ./extra - mv ./uplink.exe ./bin/ - mv ./images/ ./bin/extra/ - mv ./prism_langs/ ./bin/extra/ - mv ./themes/ ./extra/ - - - name: Setup Node.js ๐Ÿ”จ - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "npm" - - - name: Cache NPM dependencies ๐Ÿ”จ - uses: actions/cache@v3 - id: cache-windows - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - - - name: Install NPM dependencies ๐Ÿ“ฆ - if: steps.cache-windows.outputs.cache-hit != 'true' - run: npm ci - - - name: Install and Run Appium Server ๐Ÿ’ป - run: | - npm install -g appium@next - appium -v - - - name: Install Appium Driver ๐Ÿ’ป - run: | - appium driver install --source=npm appium-windows-driver - appium driver list - - - name: Setup FFMPEG to record screen - uses: FedericoCarboni/setup-ffmpeg@v2 - id: setup-ffmpeg - - - name: Delete Cache Folder if exists - Windows - run: If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break } - shell: powershell - - - name: Run Tests on Windows ๐Ÿงช - id: test-execution-windows - run: npm run windows.ci - - - name: Upload Test Report - Windows CI - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-report-windows-ci - path: ./test-report/*.xml - - - name: Upload Allure Test Results - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-allure-windows-ci - path: ./allure-results/ - - - name: Upload Screenshots for Windows ๐Ÿ“ท - uses: actions/upload-artifact@v3 - if: failure() - with: - name: appium-screenshots-windows - path: ./test-results - - - name: Upload Appium Log for Windows ๐Ÿ“ท - uses: actions/upload-artifact@v3 - if: failure() - with: - name: appium-log-windows - path: ./appium.log - - - name: Add label if any of test jobs failed - if: failure() - uses: buildsville/add-remove-label@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - labels: | - Failed Automated Test - type: add - - publish-test-results: - if: always() - needs: - [build-mac, build-windows, test-mac, test-mac-chats, test-windows-chats, test-windows] - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: write - contents: write - issues: read - - steps: - - name: Download Test Report for MacOS CI - uses: actions/download-artifact@v3 - with: - name: test-report-macos-ci - path: artifacts - - - name: Download Test Report for MacOS Chat A - uses: actions/download-artifact@v3 - with: - name: test-report-macos-chatA - path: artifacts - - - name: Download Test Report for MacOS Chat B - uses: actions/download-artifact@v3 - with: - name: test-report-macos-chatB - path: artifacts - - - name: Download Test Report for Windows Chats - uses: actions/download-artifact@v3 - with: - name: test-report-windows-chats - path: artifacts - - - name: Download Test Report for Windows CI - uses: actions/download-artifact@v3 - with: - name: test-report-windows-ci - path: artifacts - - - name: Download Allure Results for MacOS CI - uses: actions/download-artifact@v3 - with: - name: test-allure-mac-ci - path: allure - - - name: Download Allure Results for MacOS Chat A - uses: actions/download-artifact@v3 - with: - name: test-allure-mac-chatA - path: allure - - - name: Download Allure Results for MacOS Chat B - uses: actions/download-artifact@v3 - with: - name: test-allure-mac-chatB - path: allure - - - name: Download Allure Results for Windows CI - uses: actions/download-artifact@v3 - with: - name: test-allure-windows-ci - path: allure - - - name: Download Allure Results for Windows Chats - uses: actions/download-artifact@v3 - with: - name: test-allure-windows-chats - path: allure - - - name: Publish Test Results for Tests - uses: EnricoMi/publish-unit-test-result-action/composite@v2 - if: success() - with: - junit_files: "artifacts/**/*.xml" - ignore_runs: true - job_summary: false - compare_to_earlier_commit: false - check_name: "UI Automated Test Results Summary for MacOS/Windows" - - - name: Get Allure history - uses: actions/checkout@v3 - if: success() - continue-on-error: true - with: - ref: gh-pages - path: gh-pages - - - name: Allure Report action from marketplace - uses: simple-elf/allure-report-action@master - if: success() - id: allure-report - with: - gh_pages: gh-pages - allure_results: allure - allure_report: allure-report - allure_history: allure-history - keep_reports: 20 - - - name: Deploy report to Github Pages - if: success() - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: allure-history - - - name: Comment PR with the Test Results - if: success() - uses: mshick/add-pr-comment@v2 - with: - message: | - UI Automated Tests execution is complete! You can find the test results report [here](https://satellite-im.github.io/testing-uplink/${{ github.run_number }}) - remove-artifacts: needs: [ build-mac, - build-windows, test-mac, - test-mac-chats, - test-windows-chats, - test-windows, - publish-test-results, + test-mac-chats ] runs-on: ubuntu-latest @@ -744,17 +334,11 @@ jobs: uses: geekyeggo/delete-artifact@v2 with: name: | - Uplink-windows-latest - uplink-windows-assets Uplink-macos-latest test-report-macos-ci test-report-macos-chatA test-report-macos-chatB - test-report-windows-ci - test-report-windows-chats test-allure-mac-ci test-allure-mac-chatA test-allure-mac-chatB - test-allure-windows-ci - test-allure-windows-chats test-accounts diff --git a/.github/workflows/ui-automated-windows.yml b/.github/workflows/ui-automated-windows.yml new file mode 100644 index 00000000000..7063ce1e822 --- /dev/null +++ b/.github/workflows/ui-automated-windows.yml @@ -0,0 +1,456 @@ +name: UI Tests on Windows only ๐Ÿงช + +on: + schedule: + - cron: "0 0/6 * * 1-5" + pull_request: + types: [opened, synchronize, reopened, edited] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_TERM_COLOR: always + +jobs: + build-windows: + runs-on: + labels: windows-latest + + steps: + - name: Checkout testing directory ๐Ÿ”– + uses: actions/checkout@v3 + with: + repository: Satellite-im/Uplink + + - name: Install Rust ๐Ÿ’ฟ + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.70.0 + override: true + components: rustfmt, clippy + + - name: Build executable ๐Ÿ–ฅ๏ธ + run: cargo build --release -F production_mode + continue-on-error: true + + - name: Create ZIP archive on Windows ๐Ÿ—ณ๏ธ + run: Compress-Archive -Path target/release/uplink.exe -Destination uplinkWindows.zip + + - name: Copy Extensions ๐Ÿ—ณ๏ธ + run: | + mkdir ./ui/extra/extensions + cp -r ./target/release/emoji_selector.d ./ui/extra/extensions/ + cp -r ./target/release/emoji_selector.dll ./ui/extra/extensions/ + cp -r ./target/release/emoji_selector.dll.exp ./ui/extra/extensions/ + cp -r ./target/release/emoji_selector.dll.lib ./ui/extra/extensions/ + cp -r ./target/release/emoji_selector.pdb ./ui/extra/extensions/ + + - name: Upload Executable โฌ†๏ธ + uses: actions/upload-artifact@v3 + with: + name: Uplink-windows-latest + path: uplinkWindows.zip + + - name: Upload Windows Assets + uses: actions/upload-artifact@v3 + with: + name: uplink-windows-assets + path: | + ui/extra/images/ + ui/extra/prism_langs/ + ui/extra/themes/ + ui/extra/extensions/ + + - name: Add label if any of build jobs failed + if: failure() + uses: buildsville/add-remove-label@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + Failed Automated Test + type: add + + test-windows-chats: + needs: build-windows + runs-on: windows-latest + + steps: + - name: Checkout testing directory ๐Ÿ”– + uses: actions/checkout@v3 + + - name: Change resolution on Windows Runner + run: Set-DisplayResolution -Width 1920 -Height 1080 -Force + shell: powershell + + - name: Download the Windows app ๐Ÿ—ณ๏ธ + uses: actions/download-artifact@v3 + with: + name: Uplink-windows-latest + path: ./apps + + - name: Extract .zip into apps Directory ๐Ÿ—ณ๏ธ + run: Expand-Archive -Path ./apps/uplinkWindows.zip -DestinationPath ./apps + + - name: Download the Windows app assets + uses: actions/download-artifact@v3 + with: + name: uplink-windows-assets + path: ./apps + + - name: Copy app to have two instances ๐Ÿ’ฟ + working-directory: ./apps + run: | + cp -r ./uplink.exe ./uplink2.exe + + - name: Move Windows assets to correct locations ๐Ÿ’ฟ + working-directory: ./apps + run: | + mkdir ./bin/extra + mkdir ./extra + mv ./uplink.exe ./bin/ + mv ./uplink2.exe ./bin/ + mv ./images/ ./bin/extra/ + mv ./prism_langs/ ./bin/extra/ + mv ./themes/ ./extra/ + + - name: Setup Node.js ๐Ÿ”จ + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "npm" + + - name: Cache NPM dependencies ๐Ÿ”จ + uses: actions/cache@v3 + id: cache-windows-chats + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + + - name: Install NPM dependencies ๐Ÿ“ฆ + if: steps.cache-windows-chats.outputs.cache-hit != 'true' + run: npm ci + + - name: Install Appium Server ๐Ÿ’ป + run: | + npm install -g appium@next + appium -v + + - name: Install Appium Driver ๐Ÿ’ป + run: | + appium driver install --source=npm appium-windows-driver + appium driver list + + - name: Setup FFMPEG to record screen + uses: FedericoCarboni/setup-ffmpeg@v2 + id: setup-ffmpeg + + - name: Delete Cache Folder if exists - Windows + run: If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break } + shell: powershell + + - name: Run Chat Tests on Windows ๐Ÿงช + run: npm run windows.multiremote + + - name: Upload Test Report - Windows Chats + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-report-windows-chats + path: ./test-report/*.xml + + - name: Upload Allure Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-allure-windows-chats + path: ./allure-results/ + + - name: Upload Screenshots for Windows - Chats ๐Ÿ“ท + uses: actions/upload-artifact@v3 + if: failure() + with: + name: appium-screenshots-windows-chats + path: ./test-results + + - name: Upload Appium Log for Windows - Chats ๐Ÿ“ท + uses: actions/upload-artifact@v3 + if: failure() + with: + name: appium-log-windows-chats + path: | + ./appium.log + + - name: Add label if any of test jobs failed + if: failure() + uses: buildsville/add-remove-label@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + Failed Automated Test + type: add + + test-windows: + needs: build-windows + runs-on: windows-latest + + steps: + - name: Checkout testing directory ๐Ÿ”– + uses: actions/checkout@v3 + + - name: Change resolution on Windows Runner + run: Set-DisplayResolution -Width 1920 -Height 1080 -Force + shell: powershell + + - name: Download the Windows app ๐Ÿ—ณ๏ธ + uses: actions/download-artifact@v3 + with: + name: Uplink-windows-latest + path: ./apps + + - name: Extract .zip into apps Directory ๐Ÿ—ณ๏ธ + run: Expand-Archive -Path ./apps/uplinkWindows.zip -DestinationPath ./apps + + - name: Download the Windows app assets + uses: actions/download-artifact@v3 + with: + name: uplink-windows-assets + path: ./apps + + - name: Move Windows assets to correct locations ๐Ÿ’ฟ + working-directory: ./apps + run: | + mkdir ./bin/extra + mkdir ./extra + mv ./uplink.exe ./bin/ + mv ./images/ ./bin/extra/ + mv ./prism_langs/ ./bin/extra/ + mv ./themes/ ./extra/ + + - name: Setup Node.js ๐Ÿ”จ + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "npm" + + - name: Cache NPM dependencies ๐Ÿ”จ + uses: actions/cache@v3 + id: cache-windows + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + + - name: Install NPM dependencies ๐Ÿ“ฆ + if: steps.cache-windows.outputs.cache-hit != 'true' + run: npm ci + + - name: Install and Run Appium Server ๐Ÿ’ป + run: | + npm install -g appium@next + appium -v + + - name: Install Appium Driver ๐Ÿ’ป + run: | + appium driver install --source=npm appium-windows-driver + appium driver list + + - name: Setup FFMPEG to record screen + uses: FedericoCarboni/setup-ffmpeg@v2 + id: setup-ffmpeg + + - name: Delete Cache Folder if exists - Windows + run: If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break } + shell: powershell + + - name: Run Tests on Windows ๐Ÿงช + id: test-execution-windows + run: npm run windows.ci + + - name: Upload Test Report - Windows CI + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-report-windows-ci + path: ./test-report/*.xml + + - name: Upload Allure Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-allure-windows-ci + path: ./allure-results/ + + - name: Upload Screenshots for Windows ๐Ÿ“ท + uses: actions/upload-artifact@v3 + if: failure() + with: + name: appium-screenshots-windows + path: ./test-results + + - name: Upload Appium Log for Windows ๐Ÿ“ท + uses: actions/upload-artifact@v3 + if: failure() + with: + name: appium-log-windows + path: ./appium.log + + - name: Add label if any of test jobs failed + if: failure() + uses: buildsville/add-remove-label@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + Failed Automated Test + type: add + + publish-test-results: + if: always() + needs: + #[build-mac, build-windows, test-mac, test-mac-chats, test-windows-chats, test-windows] + [build-windows, test-windows-chats, test-windows] + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + contents: write + issues: read + + steps: + #- name: Download Test Report for MacOS CI + # uses: actions/download-artifact@v3 + # with: + # name: test-report-macos-ci + # path: artifacts + + #- name: Download Test Report for MacOS Chat A + # uses: actions/download-artifact@v3 + # with: + # name: test-report-macos-chatA + # path: artifacts + + #- name: Download Test Report for MacOS Chat B + # uses: actions/download-artifact@v3 + # with: + # name: test-report-macos-chatB + # path: artifacts + + - name: Download Test Report for Windows Chats + uses: actions/download-artifact@v3 + with: + name: test-report-windows-chats + path: artifacts + + - name: Download Test Report for Windows CI + uses: actions/download-artifact@v3 + with: + name: test-report-windows-ci + path: artifacts + + #- name: Download Allure Results for MacOS CI + # uses: actions/download-artifact@v3 + # with: + # name: test-allure-mac-ci + # path: allure + + #- name: Download Allure Results for MacOS Chat A + # uses: actions/download-artifact@v3 + # with: + # name: test-allure-mac-chatA + # path: allure + + #- name: Download Allure Results for MacOS Chat B + # uses: actions/download-artifact@v3 + # with: + # name: test-allure-mac-chatB + # path: allure + + - name: Download Allure Results for Windows CI + uses: actions/download-artifact@v3 + with: + name: test-allure-windows-ci + path: allure + + - name: Download Allure Results for Windows Chats + uses: actions/download-artifact@v3 + with: + name: test-allure-windows-chats + path: allure + + - name: Publish Test Results for Tests + uses: EnricoMi/publish-unit-test-result-action/composite@v2 + if: success() + with: + junit_files: "artifacts/**/*.xml" + ignore_runs: true + job_summary: false + compare_to_earlier_commit: false + check_name: "UI Automated Test Results Summary for MacOS/Windows" + + - name: Get Allure history + uses: actions/checkout@v3 + if: success() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Allure Report action from marketplace + uses: simple-elf/allure-report-action@master + if: success() + id: allure-report + with: + gh_pages: gh-pages + allure_results: allure + allure_report: allure-report + allure_history: allure-history + keep_reports: 20 + + - name: Deploy report to Github Pages + if: success() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: allure-history + + - name: Comment PR with the Test Results + if: success() + uses: mshick/add-pr-comment@v2 + with: + message: | + UI Automated Tests execution is complete! You can find the test results report [here](https://satellite-im.github.io/testing-uplink/${{ github.run_number }}) + + remove-artifacts: + needs: + [ + build-windows, + test-windows-chats, + test-windows, + publish-test-results, + ] + runs-on: ubuntu-latest + + steps: + - name: Checkout testing directory ๐Ÿ”– + uses: actions/checkout@v3 + + - name: Remove label if all test jobs succeeded + uses: buildsville/add-remove-label@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + Failed Automated Test + type: remove + + - name: Delete artifacts + uses: geekyeggo/delete-artifact@v2 + with: + name: | + Uplink-windows-latest + test-report-windows-chats + test-report-windows-ci + test-allure-windows-chats + test-allure-windows-ci diff --git a/config/wdio.mac.chatA.conf.ts b/config/wdio.mac.chatA.conf.ts index cac831eacd5..6e93a396800 100644 --- a/config/wdio.mac.chatA.conf.ts +++ b/config/wdio.mac.chatA.conf.ts @@ -55,7 +55,6 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--path", join(process.cwd() + "/tests/fixtures/users/mac2/ChatUserA")], "appium:systemPort": 4724, } }, diff --git a/config/wdio.mac.chatB.conf.ts b/config/wdio.mac.chatB.conf.ts index d9650b03d8c..a989ffc105b 100644 --- a/config/wdio.mac.chatB.conf.ts +++ b/config/wdio.mac.chatB.conf.ts @@ -55,7 +55,6 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--path", join(process.cwd() + "/tests/fixtures/users/mac2/ChatUserB")], "appium:systemPort": 4724, } }, diff --git a/config/wdio.mac.ci.conf.ts b/config/wdio.mac.ci.conf.ts index d2e98987e23..c3dce3da6a9 100644 --- a/config/wdio.mac.ci.conf.ts +++ b/config/wdio.mac.ci.conf.ts @@ -26,8 +26,11 @@ export const config: WebdriverIO.Config = { // If you are calling `wdio` from an NPM script (see https://docs.npmjs.com/cli/run-script), // then the current working directory is where your `package.json` resides, so `wdio` // will be called from there. - // - specs: [join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts")], + maxInstances: 1, + specs: [ + [join(process.cwd(), "./tests/suites/MainTests/03-CreateAccountTests.suite.ts")], + [join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts")] + ], // Patterns to exclude. exclude: [ // 'path/to/excluded/files'