Skip to content

Commit

Permalink
Run WebDriver in the background
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 10, 2024
1 parent a162cf1 commit 514fc38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/coverage-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ jobs:
- name: Test
env:
WASM_BINDGEN_USE_BROWSER: 1
CHROMEDRIVER: chromedriver
CHROMEDRIVER_REMOTE: http://127.0.0.1:9000
run: |
chromedriver --port=9000 &
mkdir coverage-output
WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_OUT=$(realpath coverage-output) cargo test --workspace --features serde --target wasm32-unknown-unknown $BUILD_STD_COMPONENTS ${{ matrix.features.features }} --tests
- name: Prepare Object Files
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,23 @@ jobs:
- {
os: ubuntu-latest,
description: Chrome,
name: CHROMEDRIVER,
value: chromedriver,
env: CHROMEDRIVER,
binary: chromedriver,
browser: true,
}
- {
os: ubuntu-latest,
description: Firefox,
name: GECKODRIVER,
value: geckodriver,
env: GECKODRIVER,
binary: geckodriver,
browser: true,
firefox: true,
}
- {
os: macos-latest,
description: Safari,
name: SAFARIDRIVER,
value: safaridriver,
env: SAFARIDRIVER,
binary: safaridriver,
browser: true,
}
- { os: ubuntu-24.04, description: Node.js, nodejs: true }
Expand Down Expand Up @@ -130,17 +130,18 @@ jobs:
- name: Set `build-std` `no_std` components
if: matrix.rust.build-std == true && matrix.features.no_std == true
run: echo "BUILD_STD_COMPONENTS=-Zbuild-std=core,alloc" >> $GITHUB_ENV
- name: Set Driver
- name: Start and set WebDriver
if: matrix.driver.browser == true
run: echo "${{ matrix.driver.name }}=${{ matrix.driver.value }}" >> $GITHUB_ENV
- name: Set Environment
run: |
${{ matrix.driver.binary }} --port=9000 &
echo "${{ matrix.driver.env }}_REMOTE=http://127.0.0.1:9000" >> $GITHUB_ENV
- name: Set environment
if: matrix.environment.name != ''
run: echo "${{ matrix.environment.name }}=1" >> $GITHUB_ENV
- name: Test
env:
RUSTFLAGS: ${{ matrix.rust.flags }}
RUSTDOCFLAGS: ${{ matrix.rust.flags }}
WASM_BINDGEN_TEST_DRIVER_TIMEOUT: 20
run:
cargo test --features serde ${{ matrix.features.features }} --target ${{
matrix.target.target }} $BUILD_STD_COMPONENTS --workspace ${{ matrix.target.docargs }}

0 comments on commit 514fc38

Please sign in to comment.