2024-08-02 13:46:56 +03:00
|
|
|
name: E2E Tests
|
2024-05-02 15:55:41 +03:00
|
|
|
on:
|
2024-05-05 20:55:42 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "0 6 * * *"
|
|
|
|
workflow_dispatch:
|
2024-05-02 15:55:41 +03:00
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
2024-08-02 13:46:56 +03:00
|
|
|
test:
|
|
|
|
name: Run WebdriverIO Tests
|
2024-05-02 15:55:41 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-08-02 13:46:56 +03:00
|
|
|
- name: Install Tauri OS dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update && sudo apt install -y \
|
|
|
|
libgtk-3-dev \
|
|
|
|
libayatana-appindicator3-dev \
|
|
|
|
libwebkit2gtk-4.0-dev \
|
|
|
|
webkit2gtk-driver \
|
|
|
|
xvfb
|
|
|
|
- name: Setup rust-toolchain stable
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup node latest
|
|
|
|
uses: actions/setup-node@v4
|
2024-05-05 21:10:18 +03:00
|
|
|
with:
|
2024-08-02 13:46:56 +03:00
|
|
|
node-version: latest
|
|
|
|
- name: Setup pnpm
|
|
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Install dependencies
|
|
|
|
shell: bash
|
|
|
|
run: pnpm install
|
|
|
|
- name: Build SvelteKit
|
|
|
|
run: pnpm build:desktop -- --mode development
|
|
|
|
- name: Build Tauri
|
|
|
|
run: pnpm build:test
|
|
|
|
- name: Install tauri-driver
|
|
|
|
run: cargo install tauri-driver@0.1.3
|
|
|
|
|
|
|
|
# Run it through `xvfb-run` to have a fake display server which allows our
|
|
|
|
# application to run headless without any changes to the code
|
|
|
|
- name: WebdriverIO
|
2024-08-02 15:17:32 +03:00
|
|
|
run: xvfb-run pnpm test:e2e
|