Skip to content

Commit

Permalink
feat: add neo4j service
Browse files Browse the repository at this point in the history
feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service

feat: add neo4j service
  • Loading branch information
tsirysndr committed Jul 24, 2024
1 parent c5050b3 commit 2838eb4
Show file tree
Hide file tree
Showing 12 changed files with 573 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/neo4j.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ci
on:
push:
branches:
- main
paths:
- neo4j/**
- .github/workflows/neo4j.yml
jobs:
neo4j-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: rust
args: |
target_add wasm32-unknown-unknown
build --release --target wasm32-unknown-unknown
working-directory: neo4j
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start neo4j
run: |
fluentci run target/wasm32-unknown-unknown/release/neo4j.wasm start
fluentci ps
fluentci status neo4j
fluentci run target/wasm32-unknown-unknown/release/neo4j.wasm stop
working-directory: neo4j
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NIX_CONFIG: extra-access-tokens = github.com=${{ secrets.GH_ACCESS_TOKEN }}
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ default-members = [
"mongodb",
"mysql",
"nats",
"neo4j",
"nginx",
"nsq",
"opentelemetry-collector",
Expand Down Expand Up @@ -80,6 +81,7 @@ members = [
"mongodb",
"mysql",
"nats",
"neo4j",
"nginx",
"nsq",
"opentelemetry-collector",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fluentci run --wasm postgres start
| [mongodb](./mongodb) | A general purpose, document-based, distributed database |
| [mysql](./mysql) | The world's most popular open source database |
| [nats](./nats) | A simple, secure and high performance messaging system |
| [neo4j](./neo4j) | A graph database management system |
| [nginx](./nginx) | HTTP and reverse proxy server |
| [nsq](./nsq) | A realtime distributed messaging platform |
| [opentelemetry-collector](./opentelemetry-collector) | OpenTelemetry Collector superset with additional collectors |
Expand Down
20 changes: 20 additions & 0 deletions neo4j/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
authors = [
"Tsiry Sandratraina <[email protected]>",
]
description = "Neo4j plugin for FluentCI"
edition = "2021"
license = "MIT"
name = "neo4j"
version = "0.1.0"

[lib]
crate-type = [
"cdylib",
]

[dependencies]
anyhow = "1.0.82"
extism-pdk = "1.1.0"
fluentci-pdk = "0.2.1"
fluentci-types = "0.1.7"
19 changes: 19 additions & 0 deletions neo4j/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2024 Tsiry Sandratraina <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions neo4j/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Neo4j Plugin

[![fluentci pipeline](https://shield.fluentci.io/x/neo4j)](https://pkg.fluentci.io/neo4j)
[![ci](https://github.com/fluentci-io/services/actions/workflows/neo4j.yml/badge.svg)](https://github.com/fluentci-io/services/actions/workflows/neo4j.yml)

Neo4j service plugin for FluentCI.

## 🚀 Usage

Add the following command to your CI configuration file:

```bash
fluentci run --wasm neo4j start
```

## Functions

| Name | Description |
| ------ | ------------------------------ |
| start | Start neo4j |
| stop | Stop neo4j |

## Code Usage

Add `fluentci-pdk` crate to your `Cargo.toml`:

```toml
[dependencies]
fluentci-pdk = "0.2.1"
```

Use the following code to call the plugin:

```rust
use fluentci_pdk::dag;

// ...

dag().call("https://pkg.fluentci.io/[email protected]?wasm=1", "start", vec![])?;
```

## 📚 Examples

Github Actions:

```yaml
- name: Setup Fluent CI CLI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: neo4j
args: |
start
```
11 changes: 11 additions & 0 deletions neo4j/fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
authors = [
"Tsiry Sandratraina <[email protected]>",
]
description = "Neo4j Plugin for FluentCI"
keywords = [
"neo4j",
]
license = "MIT"
name = "neo4j"
version = "0.1.0"
Loading

0 comments on commit 2838eb4

Please sign in to comment.