-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 3.67 KB
/
Copy pathproduction-gate.yml
File metadata and controls
83 lines (79 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Production data-plane gate
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: production-data-plane-${{ github.ref }}
cancel-in-progress: true
jobs:
short-fault-gate:
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
TIMELESS_EXT_PATH: ${{ github.workspace }}/target/release/libtimeless_ext.so
TIMELESS_EXT_TEST_PATH: ${{ github.workspace }}/target/release/libtimeless_ext.so
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
components: clippy
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: |
. -> target
servers -> servers/target
- name: Build the real extension and release servers
env:
TIMELESS_BUILD_COMMIT: ${{ github.sha }}
run: |
cargo build -p timeless-ext --release --locked
cargo build --manifest-path servers/Cargo.toml --workspace --release --locked
- name: Formatting, every workspace
# The root workspace excludes servers/, and every tool is a
# DETACHED workspace, so `cargo fmt --all` at the root reaches
# roughly a fifth of the tree. Checking each manifest explicitly is
# what keeps the others from drifting (issue #45); servers/ and four
# tool workspaces had already drifted before this ran.
run: |
for manifest in \
Cargo.toml \
servers/Cargo.toml \
tools/query-harness/Cargo.toml \
tools/bench/Cargo.toml \
tools/demogen/Cargo.toml \
tools/release-tool/Cargo.toml \
tools/libsql-check/Cargo.toml \
tools/clp-vet/Cargo.toml
do
echo "== rustfmt --check $manifest =="
cargo fmt --all --manifest-path "$manifest" -- --check
done
- name: Unit, contract, and lint gates
run: |
cargo test --workspace --locked
cargo clippy --workspace --locked -- -D warnings
cargo test --manifest-path servers/Cargo.toml --workspace --all-targets --locked
cargo clippy --manifest-path servers/Cargo.toml --workspace --all-targets --locked -- -D warnings
cargo test --manifest-path tools/query-harness/Cargo.toml --locked
cargo run --quiet --manifest-path tools/query-harness/Cargo.toml --locked -- contracts
cargo run --quiet --manifest-path tools/query-harness/Cargo.toml --locked -- oracle validate
RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps --locked
- name: Exact real-extension storage contracts
run: |
cargo test --manifest-path servers/Cargo.toml -p timeless-metrics-api --test storage_contract -- --ignored
cargo test --manifest-path servers/Cargo.toml -p timeless-logs-api --test api_e2e -- --ignored
cargo test --manifest-path servers/Cargo.toml -p timeless-traces-api --test storage_contract -- --ignored
cargo test --manifest-path servers/Cargo.toml -p timeless-traces-api --test jaeger_contract -- --ignored
- name: Two-minute mixed fault gate
run: >-
cargo run --release --manifest-path tools/query-harness/Cargo.toml --locked -- production
--mode short
--duration-seconds 120
--output production-gate-short.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: production-gate-short-${{ github.sha }}
path: production-gate-short.json
if-no-files-found: warn