Skip to content

Commit

Permalink
Crates io stages
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyMatt committed Jun 4, 2024
1 parent e7cdc42 commit 218d520
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 12 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@ jobs:
- name: Build
run: cargo build
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- name: Test
run: cargo nextest run --all
run: cargo nextest run --all
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
15 changes: 8 additions & 7 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ env:
jobs:
coverage:
runs-on: linux-latest

services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate Code Coverage
Expand All @@ -27,4 +23,9 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true
fail_ci_if_error: true
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish on crates.io

on:
push:
tags: [ '*' ]

env:
CARGO_TERM_COLOR: always

jobs:
# Ensure formatting
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rustfmt
run: cargo fmt --all --check

# Make sure no unwanted licenses or yanked crates have slipped in
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

# Make sure the release's build works
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- name: Test
run: cargo nextest run --all
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379

# Ensure no clippy warnings
check-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Clippy
run: cargo clippy --all

# Make sure the release's docs are full
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Doc
run: cargo doc --all

# Actually publish to crates.io
crates-io:
needs:
- build-linux
- doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Cargo Release
run: cargo install cargo-release
- name: Login
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
- name: Publish
run: |-
cargo release \
publish \
--all-features \
--allow-branch HEAD \
--no-confirm \
--no-verify \
--execute
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name = "falkordb"
version = "0.1.0"
edition = "2021"
description = "A FalkorDB Rust client"
license = "SSPL-1.0"


[dependencies]
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![license](https://img.shields.io/github/license/falkordb/falkordb-client-rs.svg)](https://github.com/falkordb/falkordb-client-rs)
[![Release](https://img.shields.io/github/release/falkordb/falkordb-client-rs.svg)](https://github.com/falkordb/falkordb-client-rs/releases/latest)
[![Codecov](https://codecov.io/gh/falkordb/falkordb-client-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/falkordb/falkordb-client-rs)
[![license](https://img.shields.io/github/license/falkordb/falkordb-rs.svg)](https://github.com/falkordb/falkordb-rs)
[![Release](https://img.shields.io/github/release/falkordb/falkordb-rs.svg)](https://github.com/falkordb/falkordb-rs/releases/latest)
[![Codecov](https://codecov.io/gh/falkordb/falkordb-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/falkordb/falkordb-rs)
[![Docs](https://img.shields.io/docsrs/:crate)](https://docs.rs/crate/falkordb/0.1.0)\
[![Forum](https://img.shields.io/badge/Forum-falkordb-blue)](https://github.com/orgs/FalkorDB/discussions)
[![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.gg/ErBEqN9E)

Expand All @@ -12,6 +13,14 @@ FalkorDB Rust client

## Usage

### Installation

Just add it to your `Cargo.toml`, like so

```toml
falkordb = { version = "0.1.0" }
```

### Run FalkorDB instance

Docker:
Expand All @@ -22,7 +31,7 @@ docker run --rm -p 6379:6379 falkordb/falkordb

Or use our [sandbox](https://cloud.falkordb.com/sandbox)

### Example
### Code Example

```rust
use falkordb::FalkorClientBuilder;
Expand Down

0 comments on commit 218d520

Please sign in to comment.