From de615870cc39d211f2f616931fae919ca811a4b9 Mon Sep 17 00:00:00 2001 From: Junkui Zhang <364772080@qq.com> Date: Thu, 22 May 2025 18:38:03 +0800 Subject: [PATCH] fix ci --- .github/actions/run_tests/action.yml | 13 ++++++++++++- .github/workflows/ci.yml | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml index e46bc26945e4b5f94ad9f98a882aaa51fc6189af..416788ed6611ac51600325a982f536db2eb0f3a4 100644 --- a/.github/actions/run_tests/action.yml +++ b/.github/actions/run_tests/action.yml @@ -1,6 +1,12 @@ name: "Run tests" description: "Runs the tests" +inputs: + use-xvfb: + description: "Whether to run tests with xvfb" + required: false + default: "false" + runs: using: "composite" steps: @@ -20,4 +26,9 @@ runs: - name: Run tests shell: bash -euxo pipefail {0} - run: cargo nextest run --workspace --no-fail-fast + run: | + if [ "${{ inputs.use-xvfb }}" == "true" ]; then + xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24 -nolisten tcp" cargo nextest run --workspace --no-fail-fast + else + cargo nextest run --workspace --no-fail-fast + fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2d5209b188b7038cf7436e8efef660e71c28897..91b75c3f88e5d272a5349c7de80cd28f9e8b27d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -334,6 +334,8 @@ jobs: - name: Run tests uses: ./.github/actions/run_tests + with: + use-xvfb: true - name: Build other binaries and features run: |