# run this action when the repository is pushed to
# the name of our workflow
# a single job named test
# the display name of the test job
name: WebDriverIO Test Runner
# we want to run on the latest linux environment
# the steps our job runs **in order**
# checkout the code on the workflow runner
- uses: actions/checkout@v4
# 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
sudo apt update && sudo apt install -y \
libayatana-appindicator3-dev \
- name: Setup rust-toolchain stable
uses: dtolnay/rust-toolchain@stable
# we run our rust tests before the webdriver tests to avoid testing a broken application
# build a release build of our application to be used during our WebdriverIO tests
run: cargo build --release
# install the latest stable node version at the time of writing
uses: actions/setup-node@v4
# install our Node.js dependencies with Yarn
run: yarn install --frozen-lockfile
working-directory: webdriver/webdriverio
# 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 --locked
# 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
working-directory: webdriver/webdriverio