Skip to content

Commit

Permalink
fix: in CI look for tauri-driver in /usr/local/bin/tauri-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed Sep 11, 2024
1 parent f9640fc commit d5f494e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 0 additions & 3 deletions apps/desktop/e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ RUN pnpm add --global turbo && \
cargo install tauri-driver && \
# Make `tauri-driver` more widely available
ln -s /root/.cargo/bin/tauri-driver /usr/local/bin/tauri-driver && \
# Copy tauri-driver to where GHA expects it
mkdir -p /github/home/.cargo/bin && \
ln -s /root/.cargo/bin/tauri-driver /github/home/.cargo/bin/tauri-driver && \
# vi bindings on by default.
echo "set -o vi" >> /root/.bashrc

Expand Down
10 changes: 7 additions & 3 deletions apps/desktop/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ export const config: Options.WebdriverIO = {
},

// ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests
beforeSession: () =>
(tauriDriver = spawn(path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'), [], {
beforeSession: () => {
const tauriDriverPath = process.env.CI
? path.resolve('usr', 'local', 'bin', 'tauri-driver')
: path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver');
tauriDriver = spawn(tauriDriverPath, [], {
stdio: [null, process.stdout, process.stderr]
})),
});
},

afterSession: () => {
tauriDriver.kill();
Expand Down

0 comments on commit d5f494e

Please sign in to comment.