diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f87dad1..d84b6f1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,45 +18,24 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - include: - - os: ubuntu-latest - headless: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - os: macos-latest - extra: -- --skip test_simple + # os: [macos-latest, ubuntu-latest, windows-latest] + os: [windows-latest] + # include: + # - os: ubuntu-latest + # headless: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + # - os: macos-latest + # extra: -- --skip test_simple steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 + # - if: matrix.os == 'ubuntu-latest' + # uses: awalsh128/cache-apt-pkgs-action@latest + # with: + # packages: libxtst-dev libevdev-dev libxdo-dev + # version: 1.0 - - if: matrix.os == 'ubuntu-latest' - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libxtst-dev libevdev-dev libxdo-dev - version: 1.0 - - - name: Add components - run: rustup component add clippy rustfmt - - - name: Setup headless environment - run: ${{matrix.headless}} - - - name: Rustfmt + - if: matrix.os == 'windows-latest' run: | - cargo fmt -- --check - - - name: Clippy - run: cargo clippy --all-targets --all-features -- -D warnings - - - name: Build - run: cargo build --all-features --verbose - - - name: Run tests (minimal) - run: cargo test --no-default-features --lib --bins --tests --verbose ${{matrix.extra}} - - - name: Run tests (normal) - run: cargo test --lib --bins --tests --verbose ${{matrix.extra}} - - - name: Run tests (full) - run: cargo test --all-features --lib --bins --tests --verbose ${{matrix.extra}} - + curl "https://dl.activestate.com/camel-builds/ActiveTcl/MSWin32-x64/20230607T174924Z/ActiveTcl-8.6.13.0000-MSWin32-x64-559160e0.msi" -o tcl.msi + ./tcl.msi /quiet + del "c:/Program Files (x86)/mingw64/bin/wish" + which wish diff --git a/service/src/lib.rs b/service/src/lib.rs index 8d3d6b9..24508d4 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -225,7 +225,7 @@ mod tests { wm protocol . WM_DELETE_WINDOW {destroy .}; "#, ); - thread::sleep(Duration::from_secs(1)); + input_field } @@ -236,11 +236,14 @@ mod tests { // To detect excessive backspace const LIMIT: &str = "bbb"; + // Start the sandbox + let textfield = start_sandbox(LIMIT); + // Start the afrim start_afrim(); - // Start the sandbox - let textfield = start_sandbox(LIMIT); + // We afrim to start + thread::sleep(Duration::from_secs(1)); rdev::simulate(&MouseMove { x: 100.0, y: 100.0 }).unwrap(); thread::sleep(typing_speed_ms);