Skip to content

Added hooks for p2p and c2s #138

Added hooks for p2p and c2s

Added hooks for p2p and c2s #138

Workflow file for this run

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