-
Notifications
You must be signed in to change notification settings - Fork 872
77 lines (74 loc) · 2.54 KB
/
test-e2e-blackbox.yml
File metadata and controls
77 lines (74 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: E2E Blackbox Tests
on:
push:
branches:
- master
pull_request:
branches: [master]
paths-ignore:
- "apps/web/**"
workflow_dispatch:
inputs:
sha:
type: string
required: false
description: Target SHA
jobs:
test:
name: e2e-blackbox
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/gitbutlerapp/ci-base-image@sha256:3eaeae1b07072796a53dc1e7585cdc1f462d0b11d10ecd3685c6fa8082d647dd
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
if: ${{ github.event_name != 'workflow_dispatch' }}
name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
name: Checkout (specific commit from manual dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
persist-credentials: false
ref: ${{ github.event.inputs.sha }}
# TODO: put these into the docker image
- name: Install Webdriver dependencies
run: apt update && apt install -y webkit2gtk-driver ffmpeg xvfb
if: ${{ github.ref != 'refs/heads/master' }}
- name: Rust Cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
shared-key: e2e-blackbox-rust-binaries
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Setup node environment
uses: ./.github/actions/init-env-node
- name: Build CLI
run: cargo build -p gitbutler-cli
- name: Build SvelteKit
run: pnpm build:desktop -- --mode development
- name: Build Tauri
run: pnpm build:test
- name: Install tauri-driver
if: ${{ github.ref != 'refs/heads/master' }}
run: |
if [ ! -e "$HOME/.cargo/bin/tauri-driver" ]; then
cargo install tauri-driver
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
if: ${{ github.ref != 'refs/heads/master' }}
run: xvfb-run pnpm test:e2e:blackbox
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: WebdriverIO Artifacts
overwrite: true
path: |
./e2e/blackbox/videos
~/.config/com.gitbutler.app*/logs