From 2e5b6013406264e8b68cf3efa7c0ac1bdb99f4cd Mon Sep 17 00:00:00 2001 From: John Rogers Date: Thu, 10 Jul 2025 19:31:09 +0100 Subject: [PATCH] ci: separate test workflow for parallel execution Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) --- .github/workflows/build.yml | 7 ------- .github/workflows/test.yml | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33a9eb1..51e28ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,13 +61,6 @@ jobs: PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: 1 # Add library path for the cross-compiler's linker RUSTFLAGS: -L/usr/lib/aarch64-linux-gnu - - name: Run tests on native platform - run: cargo test --release - - name: Run PTP integration tests - run: cargo test ptp_integration_test --release - - name: Run all library tests - run: cargo test --lib --release - - name: Upload artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..19e8eb8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Test Suite + +on: + push: + branches: + - main + - ptp + pull_request: + branches: + - main + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Run Tests + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install system dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y libudev-dev pkg-config cmake + + - name: Install Rust dependencies + run: cargo fetch + + - name: Run all tests + run: cargo test --release + + - name: Run PTP integration tests + run: cargo test ptp_integration_test --release + + - name: Run library tests + run: cargo test --lib --release