Skip to content

Commit fd72ff5

Browse files
committed
feat: database crate
1 parent d9bdf38 commit fd72ff5

44 files changed

Lines changed: 1771 additions & 258 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v4
6666
with:
67-
ref: 'main'
67+
ref: "main"
6868
- id: get-current-version
6969
run: echo MAIN_VERSION=$(cat VERSION) >> $GITHUB_ENV
7070
- uses: actions/checkout@v4
7171
with:
72-
ref: ${{ github.head_ref || github.ref_name }}
72+
ref: ${{ github.head_ref || github.ref_name }}
7373
token: ${{ secrets.RELEASE_PAT }}
7474
- id: bump-version
7575
run: |
@@ -78,14 +78,14 @@ jobs:
7878
7979
TODAY=$(date +"%y%m%d")
8080
81-
if [[ $MAIN_MAJOR == $TODAY ]]; then
81+
if [[ $MAIN_MAJOR == $TODAY ]]; then
8282
NEW_VERSION=$MAIN_MAJOR.$((MAIN_MINOR + 1))
8383
else
8484
NEW_VERSION=$TODAY.0
8585
fi
8686
8787
LOCAL_VERSION=$(cat VERSION)
88-
if [[ $LOCAL_VERSION == $NEW_VERSION ]]; then
88+
if [[ $LOCAL_VERSION == $NEW_VERSION ]]; then
8989
exit 0
9090
fi
9191
@@ -119,6 +119,7 @@ jobs:
119119
cargo-test:
120120
needs: [changed-files]
121121
if: needs.changed-files.outputs.rust == 'true'
122+
timeout-minutes: 20
122123
runs-on:
123124
group: ubuntu-runners
124125
strategy:
@@ -146,7 +147,7 @@ jobs:
146147
else
147148
echo Unexpected test kind $TEST_KIND
148149
exit 1
149-
fi
150+
fi
150151
151152
cargo-fmt:
152153
needs: [changed-files]
@@ -188,7 +189,15 @@ jobs:
188189
command: check license
189190

190191
docker-build-push:
191-
needs: [changed-files, cargo-build, cargo-test, cargo-fmt, cargo-clippy, cargo-deny]
192+
needs:
193+
[
194+
changed-files,
195+
cargo-build,
196+
cargo-test,
197+
cargo-fmt,
198+
cargo-clippy,
199+
cargo-deny,
200+
]
192201
if: |
193202
needs.changed-files.result != 'failure' &&
194203
(needs.changed-files.outputs.rust == 'true' || needs.changed-files.outputs.dockerfile == 'true') &&
@@ -204,7 +213,7 @@ jobs:
204213
fail-fast: false
205214
steps:
206215
- uses: actions/checkout@v4
207-
216+
208217
- uses: docker/login-action@v2
209218
with:
210219
registry: ghcr.io
@@ -250,7 +259,7 @@ jobs:
250259

251260
release:
252261
needs: [changed-files]
253-
if: github.ref_name == 'main' && needs.changed-files.outputs.version == 'true'
262+
if: github.ref_name == 'main' && needs.changed-files.outputs.version == 'true'
254263
runs-on: ubuntu-latest
255264
steps:
256265
- uses: actions/checkout@v4
@@ -269,7 +278,7 @@ jobs:
269278
270279
- name: push-tag
271280
run: |
272-
VERSION=$(cat VERSION)
281+
VERSION=$(cat VERSION)
273282
274283
git tag $VERSION
275284
git push origin "$VERSION"

Cargo.lock

Lines changed: 90 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pulse_api = { package = "wcn_pulse_api", path = "crates/pulse_api" }
4646
pulse_monitor = { path = "crates/pulse_monitor" }
4747
raft = { path = "crates/raft" }
4848
wcn_rpc = { path = "crates/rpc" }
49-
relay_rocks = { path = "crates/rocks" }
49+
wcn_rocks = { path = "crates/rocks" }
5050
metrics = "0.23"
5151
time = "0.3"
5252
libp2p = { version = "0.55", default-features = false, features = ["serde"] }
@@ -99,3 +99,5 @@ unnecessary_box_returns = "warn"
9999
unnecessary_self_imports = "warn"
100100
unused_peekable = "warn"
101101
useless_let_if_seq = "warn"
102+
result_large_err = "allow" # TODO: Remove after fixing code.
103+
large_enum_variant = "allow" # TODO: Remove after fixing code.

0 commit comments

Comments
 (0)