ci(raft): dedicated mandatory raft e2e job; no silent skips under CI
This commit is contained in:
@@ -61,6 +61,28 @@ jobs:
|
|||||||
done
|
done
|
||||||
echo "--- 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:
|
verify:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -208,6 +208,10 @@ proc runClusterScenario() =
|
|||||||
suite "Raft E2E cluster":
|
suite "Raft E2E cluster":
|
||||||
test "3-node election and failover":
|
test "3-node election and failover":
|
||||||
if not fileExists(BinaryPath):
|
if not fileExists(BinaryPath):
|
||||||
|
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)"
|
echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)"
|
||||||
skip()
|
skip()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -425,6 +425,10 @@ proc runFailoverLoadScenario() =
|
|||||||
suite "Raft failover under load E2E":
|
suite "Raft failover under load E2E":
|
||||||
test "committed writes survive a leader kill under sustained write load":
|
test "committed writes survive a leader kill under sustained write load":
|
||||||
if not fileExists(BinaryPath):
|
if not fileExists(BinaryPath):
|
||||||
|
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)"
|
echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)"
|
||||||
skip()
|
skip()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -412,6 +412,10 @@ proc runWritesScenario() =
|
|||||||
suite "Raft replicated writes E2E":
|
suite "Raft replicated writes E2E":
|
||||||
test "writes replicate, followers reject, failover resumes writes":
|
test "writes replicate, followers reject, failover resumes writes":
|
||||||
if not fileExists(BinaryPath):
|
if not fileExists(BinaryPath):
|
||||||
|
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)"
|
echo "[SKIP] ", BinaryPath, " missing — run `nimble test` (builds the server first)"
|
||||||
skip()
|
skip()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user