Skip to content

Commit 8556226

Browse files
lucacillarioLuca Cillariothlorenz
authored
feat: parallel CI integration tests (#605)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Optimized continuous integration pipeline with restructured test execution workflow. * Enhanced build system efficiency for integration testing processes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Luca Cillario <luca@magicblock.gg> Co-authored-by: Thorsten Lorenz <thlorenz@gmx.de>
1 parent 609158f commit 8556226

File tree

2 files changed

+49
-6
lines changed

2 files changed

+49
-6
lines changed

.github/workflows/ci-test-integration.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ on:
1111
types: [opened, reopened, synchronize, ready_for_review]
1212

1313
jobs:
14-
run_make_ci_test:
15-
if: github.event.pull_request.draft == false
14+
build:
15+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
1616
runs-on: extra-large
17+
name: Build Project
1718
steps:
1819
- name: Checkout this magicblock-validator
19-
uses: actions/checkout@v2
20+
uses: actions/checkout@v5
2021
with:
2122
path: magicblock-validator
2223

@@ -29,11 +30,54 @@ jobs:
2930

3031
- uses: ./magicblock-validator/.github/actions/setup-solana
3132

32-
- name: Run integration tests
33+
- name: Build project and test programs
34+
run: |
35+
cargo build --locked
36+
make -C test-integration programs
37+
shell: bash
38+
working-directory: magicblock-validator
39+
40+
run_integration_tests:
41+
needs: build
42+
runs-on: extra-large
43+
strategy:
44+
matrix:
45+
batch_tests:
46+
- "schedulecommit"
47+
- "chainlink"
48+
- "cloning"
49+
- "restore_ledger"
50+
- "magicblock_api"
51+
- "config"
52+
- "table_mania"
53+
- "committor"
54+
- "pubsub"
55+
- "schedule_intents"
56+
- "task-scheduler"
57+
fail-fast: false
58+
name: Integration Tests - ${{ matrix.batch_tests }}
59+
steps:
60+
- name: Checkout this magicblock-validator
61+
uses: actions/checkout@v5
62+
with:
63+
path: magicblock-validator
64+
65+
- uses: ./magicblock-validator/.github/actions/setup-build-env
66+
with:
67+
build_cache_key_name: "magicblock-validator-ci-test-integration-v000"
68+
rust_toolchain_release: "1.84.1"
69+
github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
70+
github_token: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- uses: ./magicblock-validator/.github/actions/setup-solana
73+
74+
- name: Run integration tests - ${{ matrix.batch_tests }}
3375
run: |
3476
sudo prlimit --pid $$ --nofile=1048576:1048576
3577
sudo sysctl fs.inotify.max_user_instances=1280
3678
sudo sysctl fs.inotify.max_user_watches=655360
3779
make ci-test-integration
3880
shell: bash
3981
working-directory: magicblock-validator
82+
env:
83+
RUN_TESTS: ${{ matrix.batch_tests }}

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ ci-test-unit:
5252
RUST_BACKTRACE=1 cargo $(CARGO_TEST_NOCAP)
5353

5454
ci-test-integration:
55-
cargo build --locked && \
56-
$(MAKE) -C $(DIR)/test-integration test
55+
RUN_TESTS=$(RUN_TESTS) $(MAKE) -C $(DIR)/test-integration test
5756

5857
## NOTE: We're getting the following error in github CI when trying to use
5958
# nightly Rust. Until that is fixed we have to use stable to verify format.

0 commit comments

Comments
 (0)