From 7f8606c301318eb83e5229a2851fc9e4ab0c2933 Mon Sep 17 00:00:00 2001 From: tirthpatel90 Date: Sun, 26 Apr 2026 18:26:23 +0530 Subject: [PATCH 1/2] ci: implement parallel matrix architecture for segmented testing --- .github/workflows/test-parallel.yml | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test-parallel.yml diff --git a/.github/workflows/test-parallel.yml b/.github/workflows/test-parallel.yml new file mode 100644 index 000000000..a5c75a5b8 --- /dev/null +++ b/.github/workflows/test-parallel.yml @@ -0,0 +1,49 @@ +name: Parallel Matrix CI + +on: + push: + branches: + - feature/parallel-ci-workflows + workflow_dispatch: + +permissions: + contents: read + +jobs: + parallel-tests: + name: ${{ matrix.batch_name }} + runs-on: ubuntu-latest + + # Using the optimized base image suggested by rlzzy + container: + image: ghcr.io/tirthpatel90/serena-maximal:latest # (Note: will change this to rlzzy's image later, using ours just to test logic) + + strategy: + # fail-fast: false ensures that if one batch fails, the others keep running + fail-fast: false + matrix: + include: + - batch_name: 'Heavy Toolchains (C++, Rust, Java)' + pytest_targets: 'test/solidlsp/cpp test/solidlsp/rust test/solidlsp/java test/solidlsp/haskell' + + - batch_name: 'Medium Toolchains (Go, Julia, Swift, Lean4)' + pytest_targets: 'test/solidlsp/go test/solidlsp/julia test/solidlsp/swift test/solidlsp/lean4' + + - batch_name: 'Catch-All (Core Framework & Remaining Languages)' + # Runs everything in test/ EXCEPT the explicitly batched heavy toolchains + pytest_targets: 'test/ --ignore=test/solidlsp/cpp --ignore=test/solidlsp/rust --ignore=test/solidlsp/java --ignore=test/solidlsp/haskell --ignore=test/solidlsp/go --ignore=test/solidlsp/julia --ignore=test/solidlsp/swift --ignore=test/solidlsp/lean4' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Quick Workspace Sync + shell: bash + run: | + uv sync --extra dev --locked + uv pip list + + - name: Run Pytest Batch + shell: bash + # Dynamically injects the targets/ignores from the matrix strategy + run: uv run poe test -q --tb=short ${{ matrix.pytest_targets }} \ No newline at end of file From c9dcbd76505b831979f560026dad08427e5a2d6c Mon Sep 17 00:00:00 2001 From: tirthpatel90 Date: Sun, 26 Apr 2026 18:35:47 +0530 Subject: [PATCH 2/2] ci: temporarily exclude missing toolchains to verify parallel speed --- .github/workflows/test-parallel.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-parallel.yml b/.github/workflows/test-parallel.yml index a5c75a5b8..e1862a8ea 100644 --- a/.github/workflows/test-parallel.yml +++ b/.github/workflows/test-parallel.yml @@ -19,20 +19,20 @@ jobs: image: ghcr.io/tirthpatel90/serena-maximal:latest # (Note: will change this to rlzzy's image later, using ours just to test logic) strategy: - # fail-fast: false ensures that if one batch fails, the others keep running fail-fast: false matrix: include: - batch_name: 'Heavy Toolchains (C++, Rust, Java)' - pytest_targets: 'test/solidlsp/cpp test/solidlsp/rust test/solidlsp/java test/solidlsp/haskell' + # Haskell removed for now as it's not in the image + pytest_targets: 'test/solidlsp/cpp test/solidlsp/rust test/solidlsp/java' - - batch_name: 'Medium Toolchains (Go, Julia, Swift, Lean4)' - pytest_targets: 'test/solidlsp/go test/solidlsp/julia test/solidlsp/swift test/solidlsp/lean4' + - batch_name: 'Medium Toolchains (Go, Julia)' + # Swift and Lean4 removed for now + pytest_targets: 'test/solidlsp/go test/solidlsp/julia' - batch_name: 'Catch-All (Core Framework & Remaining Languages)' - # Runs everything in test/ EXCEPT the explicitly batched heavy toolchains - pytest_targets: 'test/ --ignore=test/solidlsp/cpp --ignore=test/solidlsp/rust --ignore=test/solidlsp/java --ignore=test/solidlsp/haskell --ignore=test/solidlsp/go --ignore=test/solidlsp/julia --ignore=test/solidlsp/swift --ignore=test/solidlsp/lean4' - + # Ignoring the explicitly batched languages PLUS the missing ones so they don't fail here either + pytest_targets: 'test/ --ignore=test/solidlsp/cpp --ignore=test/solidlsp/rust --ignore=test/solidlsp/java --ignore=test/solidlsp/go --ignore=test/solidlsp/julia --ignore=test/solidlsp/haskell --ignore=test/solidlsp/swift --ignore=test/solidlsp/lean4' steps: - name: Checkout code uses: actions/checkout@v4