From efa46b05c65343b7f5fa6c911f983e11a9a83a42 Mon Sep 17 00:00:00 2001 From: dimgigov Date: Fri, 31 Jul 2026 01:07:11 +0300 Subject: [PATCH] ci(raft): dedicated mandatory raft e2e job; no silent skips under CI --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ tests/raft_e2e_test.nim | 8 ++++++-- tests/raft_failover_load_e2e_test.nim | 8 ++++++-- tests/raft_writes_e2e_test.nim | 8 ++++++-- 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46b2983..089609b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,28 @@ jobs: done echo "--- Done ---" + raft-e2e: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Nim + uses: jiro4989/setup-nim-action@v1 + with: + nim-version: '2.2.10' + - name: Install system dependencies + run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl-dev libpcre3-dev openssl ca-certificates + - name: Install Nim dependencies + run: nimble install --depsOnly -y + - name: Build server + run: nim c -d:ssl -o:build/baradadb src/baradadb.nim + - name: Raft e2e suites + env: + CI: "true" + run: | + nim c -d:ssl --threads:on --path:src -r tests/raft_e2e_test.nim + nim c -d:ssl --threads:on --path:src -r tests/raft_writes_e2e_test.nim + nim c -d:ssl --threads:on --path:src -r tests/raft_failover_load_e2e_test.nim + verify: runs-on: ubuntu-latest steps: diff --git a/tests/raft_e2e_test.nim b/tests/raft_e2e_test.nim index 8b5c000..0222e47 100644 --- a/tests/raft_e2e_test.nim +++ b/tests/raft_e2e_test.nim @@ -208,7 +208,11 @@ proc runClusterScenario() = suite "Raft E2E cluster": test "3-node election and failover": if not fileExists(BinaryPath): - echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" - skip() + if getEnv("CI").len > 0: + echo "[FAIL] ", BinaryPath, " missing under CI — build step broken?" + fail() + else: + echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" + skip() else: runClusterScenario() diff --git a/tests/raft_failover_load_e2e_test.nim b/tests/raft_failover_load_e2e_test.nim index fab8a7f..a36cb93 100644 --- a/tests/raft_failover_load_e2e_test.nim +++ b/tests/raft_failover_load_e2e_test.nim @@ -425,7 +425,11 @@ proc runFailoverLoadScenario() = suite "Raft failover under load E2E": test "committed writes survive a leader kill under sustained write load": if not fileExists(BinaryPath): - echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" - skip() + if getEnv("CI").len > 0: + echo "[FAIL] ", BinaryPath, " missing under CI — build step broken?" + fail() + else: + echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" + skip() else: runFailoverLoadScenario() diff --git a/tests/raft_writes_e2e_test.nim b/tests/raft_writes_e2e_test.nim index aba97b5..917822c 100644 --- a/tests/raft_writes_e2e_test.nim +++ b/tests/raft_writes_e2e_test.nim @@ -412,7 +412,11 @@ proc runWritesScenario() = suite "Raft replicated writes E2E": test "writes replicate, followers reject, failover resumes writes": if not fileExists(BinaryPath): - echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" - skip() + if getEnv("CI").len > 0: + echo "[FAIL] ", BinaryPath, " missing under CI — build step broken?" + fail() + else: + echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)" + skip() else: runWritesScenario()