From 73097ad074a320e2f0abcb780544ffaaad4a874e Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Mon, 15 Apr 2024 00:12:07 +0100 Subject: [PATCH] fix --- .github/workflows/rust.yml | 8 ++++++++ src/lib.rs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d84d7f8..2657a81 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,10 +13,15 @@ env: jobs: build: runs-on: ${{matrix.os}} + env: + DISPLAY: ':99' 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 & steps: - uses: actions/checkout@v3 @@ -30,6 +35,9 @@ jobs: packages: libxtst-dev libevdev-dev libxdo-dev version: 1.0 + - name: Setup headless environment + run: ${{matrix.headless}} + - name: Add components run: rustup component add clippy rustfmt diff --git a/src/lib.rs b/src/lib.rs index 0f19e06..c1677e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -487,8 +487,8 @@ mod tests { afrim_wish.display(); // Test the geometry. - (0..800).for_each(|i| { - if i % 100 != 0 { + (0..100).for_each(|i| { + if i % 10 != 0 { return; }; let i = i as f64;