2022-09-20 06:23:54 +02:00
|
|
|
---
|
|
|
|
name: WASM Testing
|
|
|
|
|
|
|
|
# Trigger the workflow on push or pull request
|
|
|
|
"on": [push, pull_request]
|
|
|
|
|
2023-04-27 14:35:24 +02:00
|
|
|
env:
|
|
|
|
SCCACHE_GHA_ENABLED: "true"
|
|
|
|
RUSTC_WRAPPER: "sccache"
|
|
|
|
|
2023-05-06 14:54:05 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-09-20 06:23:54 +02:00
|
|
|
jobs:
|
|
|
|
wasm_test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-06 02:25:30 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-27 03:38:22 +02:00
|
|
|
# - name: Check arch
|
|
|
|
# run: |
|
|
|
|
# uname -a
|
2023-04-27 14:35:24 +02:00
|
|
|
- name: Setup sccache
|
|
|
|
uses: mozilla-actions/sccache-action@v0.0.3
|
2023-05-04 10:40:00 +02:00
|
|
|
with:
|
|
|
|
version: "v0.4.2"
|
2023-06-27 03:38:22 +02:00
|
|
|
- name: Install Rust
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-09-20 06:23:54 +02:00
|
|
|
- name: Install wasm-pack
|
2023-04-25 14:36:17 +02:00
|
|
|
run: cargo install wasm-pack
|
2023-06-27 03:38:22 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
scripts/install_ubuntu_dependencies.sh
|
2022-09-20 06:23:54 +02:00
|
|
|
# https://github.com/browser-actions/setup-chrome
|
|
|
|
- name: Install Chrome Headless
|
|
|
|
uses: browser-actions/setup-chrome@latest
|
|
|
|
with:
|
|
|
|
chrome-version: latest
|
|
|
|
# https://github.com/marketplace/actions/setup-chromedriver
|
2023-07-28 02:48:37 +02:00
|
|
|
- uses: nanasess/setup-chromedriver@v2
|
2022-11-13 23:57:05 +01:00
|
|
|
# with:
|
|
|
|
# Optional: do not specify to match Chrome's version
|
|
|
|
# chromedriver-version: '88.0.4324.96'
|
2022-09-20 06:23:54 +02:00
|
|
|
|
2023-07-10 08:49:09 +02:00
|
|
|
# - run: make webui
|
2023-06-27 03:38:22 +02:00
|
|
|
- name: "Run wasm-pack test"
|
2023-07-10 08:49:09 +02:00
|
|
|
# https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/browsers.html
|
2023-06-27 03:38:22 +02:00
|
|
|
run: make webui/test
|
2022-09-20 06:23:54 +02:00
|
|
|
continue-on-error: true
|
2023-07-10 08:49:09 +02:00
|
|
|
|
|
|
|
- name: "Run webdriver tests"
|
|
|
|
run: |
|
|
|
|
chromedriver &
|
2023-09-22 09:23:02 +02:00
|
|
|
cargo test -p kanidmd_testkit --features webdriver test_webdriver
|
2023-07-10 08:49:09 +02:00
|
|
|
env:
|
|
|
|
DISPLAY: ":99"
|