-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (67 loc) · 2.38 KB
/
webdriver.yml
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
78
name: Validate branch
on:
workflow_call:
push:
branches: ['master']
pull_request:
branches: ['master']
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
# 40 MiB stack
RUST_MIN_STACK: 40971520
RUST_LOG: 'citadel=warn'
jobs:
# a single job named test
test:
# the display name of the test job
name: WebDriverIO Test Runner
# we want to run on the latest linux environment
runs-on: ubuntu-latest
# the steps our job runs **in order**
steps:
# checkout the code on the workflow runner
- uses: actions/checkout@v2
- uses: Avarok-Cybersecurity/gh-actions-deps@master
# install system dependencies that Tauri needs to compile on Linux.
# note the extra dependencies for `tauri-driver` to run which are: `webkit2gtk-driver` and `xvfb`
- name: Tauri dependencies
run: >-
sudo apt-get update &&
sudo apt-get install -y
libgtk-3-dev
libayatana-appindicator3-dev
libwebkit2gtk-4.0-dev
webkit2gtk-driver
xvfb
# install the latest Rust stable
- name: Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# # we run our rust tests before the webdriver tests to avoid testing a broken application
- name: Cargo test
run: cargo test --package citadel-workspace
# # build a release build of our application to be used during our WebdriverIO tests
- name: Cargo build
run: cargo build --package citadel-workspace --release
# install the latest stable node version at the time of writing
- name: Node v16
uses: actions/setup-node@v2
with:
node-version: 16.x
# install our Node.js dependencies with Yarn
- name: Yarn install
run: yarn install
# install the latest version of `tauri-driver`.
# note: the tauri-driver version is independent of any other Tauri versions
- name: Install tauri-driver
run: cargo install tauri-driver
# run the WebdriverIO test suite.
# we run it through `xvfb-run` (the dependency we installed earlier) to have a fake
# display server which allows our application to run headless without any changes to the code
- name: WebdriverIO
run: xvfb-run yarn test