gitbutler/.github/workflows/test-e2e.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

name: E2E Tests
2024-05-02 15:55:41 +03:00
on:
pull_request:
branches: [master]
2024-08-06 13:08:49 +03:00
workflow_dispatch:
inputs:
sha:
type: string
required: false
description: Target SHA
2024-05-02 15:55:41 +03:00
jobs:
test:
name: Run WebdriverIO Tests
2024-05-02 15:55:41 +03:00
runs-on: ubuntu-latest
2024-08-06 13:08:49 +03:00
env:
CARGO_TERM_COLOR: always
2024-05-02 15:55:41 +03:00
steps:
- uses: actions/checkout@v4
2024-08-06 13:08:49 +03:00
with:
ref: ${{ github.event.inputs.sha }}
- 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
2024-08-06 13:08:49 +03:00
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
2024-08-06 13:08:49 +03:00
- uses: actions/cache@v3
2024-05-05 21:10:18 +03:00
with:
2024-08-06 13:08:49 +03:00
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-
- name: Setup node environment
uses: ./.github/actions/init-env-node
- name: Build SvelteKit
run: pnpm build:desktop -- --mode development
- name: Build Tauri
run: pnpm build:test
- name: Install tauri-driver
2024-08-06 13:08:49 +03:00
run: |
if [ ! -e "$HOME/.cargo/bin/tauri-driver" ]; then
cargo install tauri-driver@0.1.3
fi
# 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