Skip to content

chore(warp): Update dependency #4091

chore(warp): Update dependency

chore(warp): Update dependency #4091

name: UI Tests on Windows and MacOS 🧪
on:
pull_request:
types: [opened, synchronize, reopened, edited]
paths-ignore:
- ".github/workflows/**"
- "!.github/workflows/ui-test-automation.yml"
- ".idea/**"
- ".vscode/**"
- "docs/**"
- "ui/docs/**"
- "utils/**"
- "README.md"
- ".gitignore"
- "LICENSE"
- "PULL_REQUEST_TEMPLATE.md"
- ".prettierignore"
- ".prettierrc"
- ".scss-lint.yml"
- "assistant.sh"
- "build_linux_installer.sh"
- "launch_docker.sh"
- "macos-install_dependencies.sh"
- "quick_build.sh"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
create-node:
runs-on: ubuntu-latest
steps:
- name: Checkout Warp directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: ef8b1fa7e7bb9ad2a17ed5c8c192bf385c5da774
- name: Set up cargo cache 🛠️
uses: Swatinem/rust-cache@v2
- name: Install Rust 💿
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Run cargo build shuttle on Warp 🚀
run: cargo build --bin shuttle --release
- name: Launch CI instance of Warp 🚀
run: ./target/release/shuttle --keyfile key.bin --listen-addr /ip4/127.0.0.1/tcp/4444 > peerID.txt &
- name: Upload Artifact Peer ID data⬆️
uses: actions/upload-artifact@v3
with:
name: peerID
path: peerID.txt
- name: Upload Artifact Key File data⬆️
uses: actions/upload-artifact@v3
with:
name: keyfile
path: key.bin
build-mac:
needs: create-node
runs-on: macos-14
steps:
- name: Checkout Uplink Repo 🔖
uses: actions/checkout@v4
- name: Download Peer ID file 🗳️
uses: actions/download-artifact@v3
with:
name: peerID
path: ./warp
- name: Set up cargo cache 🛠️
uses: Swatinem/rust-cache@v2
- name: Install Rust 💿
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75.0
components: rustfmt, clippy
- name: Add Targets for MacOS
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
run: |
rustup target add x86_64-apple-darwin aarch64-apple-darwin
- name: Replace Warp Peer ID in Uplink 🚀
run: |
chmod +x ./utils/replace_node.sh
./utils/replace_node.sh
- name: Build executable 🖥️
run: make dmg
continue-on-error: true
- name: Create ZIP archive on MacOS 🗳️
run: |
ditto -c -k --sequesterRsrc --keepParent target/release/macos/Uplink.app Uplink-Mac-Universal.zip
- name: Calculate hashes 🧮
run: |
shasum -a 256 Uplink-Mac-Universal.zip > Uplink-Mac-Universal.zip.sha256.txt
- name: Upload Artifact ⬆️
uses: actions/upload-artifact@v3
env:
NODE_OPTIONS: "--max-old-space-size=8192"
with:
name: app-macos
if-no-files-found: error
path: |
Uplink-Mac-Universal.zip
Uplink-Mac-Universal.zip.sha256.txt
- name: Add label if any of build or test jobs failed
if: failure()
uses: buildsville/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
build-windows:
needs: create-node
runs-on:
labels: windows-latest
steps:
- name: Checkout Uplink Repo 🔖
uses: actions/checkout@v4
- name: Download Peer ID file 🗳️
uses: actions/download-artifact@v3
with:
name: peerID
path: ./warp
- name: Install Wix
uses: actions/checkout@v4
with:
repository: fbarresi/wix
path: wix
- name: Set up cargo cache 🛠️
uses: Swatinem/rust-cache@v2
- name: Install Rust 💿
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75.0
components: rustfmt, clippy
- name: Install cargo wix
run: cargo install cargo-wix
- name: Get Warp Peer ID and Build app 🚀
run: |
./utils/replace_node.ps1
cargo build --release -F production_mode
- name: Build Installer
run: cargo wix --package uplink --no-build --nocapture
- name: Upload Executable ⬆️
uses: actions/upload-artifact@v3
with:
name: Uplink-Windows
path: target/wix/*.msi
- name: Add label if any of build or test jobs failed
if: failure()
uses: buildsville/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
test-mac:
needs: build-mac
runs-on: macos-14
steps:
- name: Checkout testing directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/testing-uplink
- name: Checkout Warp directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: ef8b1fa7e7bb9ad2a17ed5c8c192bf385c5da774
path: "./warp"
- name: Install Dependencies for WebdriverIO
continue-on-error: true
run: |
brew update
brew install cairo pango
- name: Download Key file 🗳️
uses: actions/download-artifact@v3
with:
name: keyfile
path: ./warp
- name: Install Rust 💿
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Setup Node.js 🔨
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: Cache NPM dependencies 🔨
uses: actions/cache@v3
id: cache-mac
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install NPM dependencies 📦
if: steps.cache-mac.outputs.cache-hit != 'true'
run: npm ci
- name: Enable opening app not codesigned 🖥️
run: sudo spctl --master-disable
- name: Download the MacOS app 🗳️
uses: actions/download-artifact@v3
with:
name: app-macos
path: ./apps
- name: Copy DMG to Appium Apps Directory 💿
working-directory: ./apps
run: |
unzip Uplink-Mac-Universal.zip
cp -r ./Uplink.app ./Uplink2.app
perl -i -pe 's/im.satellite.uplink/im.satellite.uplinkChatUserB/g' ./Uplink2.app/Contents/Info.plist
cp -r ./Uplink.app /Applications/
cp -r ./Uplink2.app /Applications/
sudo xattr -r -d com.apple.quarantine /Applications/Uplink.app
sudo xattr -r -d com.apple.quarantine /Applications/Uplink2.app
- name: Update MacOS runner to not autocorrect text
run: |
defaults write -g NSAutomaticCapitalizationEnabled -bool false
defaults write -g NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
- name: Delete Cache Folder and copy reusable data
run: |
rm -rf ~/.uplink
mkdir ./tests/fixtures/users/mac2
cp -r ./tests/fixtures/users/FriendsTestUser/ ./tests/fixtures/users/mac2/FriendsTestUser
- name: Run cargo build shuttle on Warp 🚀
working-directory: ./warp
run: cargo build --bin shuttle --release
- name: Launch CI instance of Warp 🚀
working-directory: ./warp
run: ./target/release/shuttle --keyfile key.bin --listen-addr /ip4/127.0.0.1/tcp/4444 &
- name: Run Tests on MacOS 🧪
run: npm run mac.ci
- name: Upload Test Report - MacOS CI
if: always()
uses: actions/upload-artifact@v3
with:
name: test-report-macos-ci
path: ./test-report/*.xml
- name: Upload Allure Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-allure-macos-ci
path: ./allure-results/
- name: Upload Screenshots for MacOS 📷
uses: actions/upload-artifact@v3
if: failure()
with:
name: appium-screenshots-MacOS
path: ./test-results
- name: Upload Appium Log for MacOS 📷
uses: actions/upload-artifact@v3
if: failure()
with:
name: appium-log-macos
path: ./appium.log
- name: Add label if any of test jobs failed
if: failure()
uses: buildsville/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
test-mac-chats:
needs: build-mac
runs-on: macos-14
steps:
- name: Checkout testing directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/testing-uplink
- name: Checkout Warp directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: ef8b1fa7e7bb9ad2a17ed5c8c192bf385c5da774
path: "./warp"
- name: Install Dependencies for WebdriverIO
continue-on-error: true
run: |
brew update
brew install cairo pango
- name: Download Key file 🗳️
uses: actions/download-artifact@v3
with:
name: keyfile
path: ./warp
- name: Install Rust 💿
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Setup Node.js 🔨
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: Cache NPM dependencies 🔨
uses: actions/cache@v3
id: cache-mac
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install NPM dependencies 📦
if: steps.cache-mac.outputs.cache-hit != 'true'
run: npm ci
- name: Enable opening app not codesigned 🖥️
run: sudo spctl --master-disable
- name: Download the MacOS app 🗳️
uses: actions/download-artifact@v3
with:
name: app-macos
path: ./apps
- name: Copy DMG to Appium Apps Directory 💿
working-directory: ./apps
run: |
unzip Uplink-Mac-Universal.zip
cp -r ./Uplink.app ./Uplink2.app
cp -r ./Uplink.app ./Uplink3.app
perl -i -pe 's/im.satellite.uplink/im.satellite.uplinkChatUserA/g' ./Uplink.app/Contents/Info.plist
perl -i -pe 's/im.satellite.uplink/im.satellite.uplinkChatUserB/g' ./Uplink2.app/Contents/Info.plist
perl -i -pe 's/im.satellite.uplink/im.satellite.uplinkChatUserC/g' ./Uplink3.app/Contents/Info.plist
cp -r ./Uplink.app /Applications/
cp -r ./Uplink2.app /Applications/
cp -r ./Uplink3.app /Applications/
sudo xattr -r -d com.apple.quarantine /Applications/Uplink.app
sudo xattr -r -d com.apple.quarantine /Applications/Uplink2.app
sudo xattr -r -d com.apple.quarantine /Applications/Uplink3.app
- name: Update MacOS runner to not autocorrect text
run: |
defaults write -g NSAutomaticCapitalizationEnabled -bool false
defaults write -g NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
- name: Run cargo build shuttle on Warp 🚀
working-directory: ./warp
run: cargo build --bin shuttle --release
- name: Launch CI instance of Warp 🚀
working-directory: ./warp
run: ./target/release/shuttle --keyfile key.bin --listen-addr /ip4/127.0.0.1/tcp/4444 &
- name: Run Tests on MacOS 🧪
run: npm run mac.multiremote
- name: Upload Test Report - MacOS Chats
if: always()
uses: actions/upload-artifact@v3
with:
name: test-report-macos-chats
path: ./test-report/*.xml
- name: Upload Allure Test Results for MacOS Chats
if: always()
uses: actions/upload-artifact@v3
with:
name: test-allure-macos-chats
path: ./allure-results/
- name: Upload Screenshots for MacOS Chats 📷
uses: actions/upload-artifact@v3
if: failure()
with:
name: appium-screenshots-MacOS-chats
path: ./test-results
- name: Upload Appium Log for MacOS Chats 📷
uses: actions/upload-artifact@v3
if: failure()
with:
name: appium-log-macos-chats
path: ./appium.log
- name: Upload Uplink Logs if test fails 📷
uses: actions/upload-artifact@v3
if: failure()
with:
name: uplink-logs
path: |
~/.uplink/.user/debug.log
~/.uplinkUserB/.user/debug.log
- name: Add label if any of test jobs failed
if: failure()
uses: buildsville/[email protected]
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@v4
with:
repository: Satellite-im/testing-uplink
- name: Checkout Warp directory 🔖
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: ef8b1fa7e7bb9ad2a17ed5c8c192bf385c5da774
path: "./warp"
- name: Download Key file 🗳️
uses: actions/download-artifact@v3
with:
name: keyfile
path: ./warp
- name: Install Rust 💿
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
override: true
components: rustfmt, clippy
- name: Change resolution on Windows Runner
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
shell: powershell
- name: Setup Node.js 🔨
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: Cache NPM dependencies 🔨
uses: actions/cache@v3
id: cache-mac
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install NPM dependencies 📦
if: steps.cache-mac.outputs.cache-hit != 'true'
run: npm ci
- name: Download the Windows app 🗳️
uses: actions/download-artifact@v3
with:
name: Uplink-Windows
path: ./apps
- name: Install MSI and copy assets
working-directory: ./apps
run: |
Get-ChildItem -Recurse -Include "*.msi" | Rename-Item -NewName "uplink.msi"
mkdir C:\uplink
mv ./uplink.msi C:\uplink
Start-Process msiexec.exe -Wait -ArgumentList '/i "C:\uplink\uplink.msi" /qb'
- name: Copy assets from Uplink for Appium Execution
run: |
mkdir C:\Program` Files\extensions
mkdir $home/.uplink/themes
mkdir $home/.uplink/extensions
cp -r C:\Program` Files\uplink\bin\uplink.exe C:\Program` Files\uplink
cp -r C:\Program` Files\uplink\extensions\emoji_selector.dll C:\Program` Files\extensions
cp -r C:\Program` Files\uplink\extra\themes\ $home/.uplink/themes
cp -r C:\Program` Files\uplink\extensions\emoji_selector.dll $home/.uplink/extensions
- 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 cargo build shuttle on Warp 🚀
working-directory: ./warp
run: cargo build --bin shuttle --release
- name: Launch CI instance of Warp 🚀
working-directory: ./warp
run: ./target/release/shuttle --keyfile key.bin --listen-addr /ip4/127.0.0.1/tcp/4444 &
- name: Run Tests on Windows 🧪
run: |
$env:DRIVER="windows"
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/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
publish-results:
if: always()
needs:
- create-node
- build-mac
- build-windows
- test-mac
- test-mac-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 Chats
uses: actions/download-artifact@v3
with:
name: test-report-macos-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-macos-ci
path: testing-uplink/allure
- name: Download Allure Results for Windows CI
uses: actions/download-artifact@v3
with:
name: test-allure-windows-ci
path: testing-uplink/allure
- name: Download Allure Results for MacOS Chats
uses: actions/download-artifact@v3
with:
name: test-allure-macos-chats
path: testing-uplink/allure
- name: Publish Test Results Summary
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@v4
if: success()
continue-on-error: true
with:
repository: Satellite-im/test-reports
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: testing-uplink/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:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: Satellite-im/test-reports
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/test-reports/${{ github.run_number }})
remove-label:
needs:
- create-node
- build-mac
- build-windows
- test-mac
- test-mac-chats
- test-windows
- publish-results
runs-on: ubuntu-latest
steps:
- name: Checkout testing directory 🔖
uses: actions/checkout@v4
- name: Delete all artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
peerID
keyfile
Uplink-Windows
uplink-windows-assets
app-macos
test-report-macos-ci
test-report-windows-ci
test-report-macos-chats
test-allure-macos-ci
test-allure-windows-ci
test-allure-macos-chats
uplink-logs
- name: Remove label if all test jobs succeeded
uses: buildsville/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: remove