Skip to content

Commit

Permalink
feat: fluence service and spell for joining events from checkpointer
Browse files Browse the repository at this point in the history
Adds a fluence service and the related aqua spell to call it periodically.
Additionally adds initial CI functionality and basic tests around it.
  • Loading branch information
dbcfd committed Feb 6, 2024
1 parent aca7de3 commit b4b6292
Show file tree
Hide file tree
Showing 40 changed files with 7,490 additions and 1,142 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.it
target
.github
.vscode
ci-scripts
.fluence
17 changes: 17 additions & 0 deletions .fluence/aqua/deals.aqua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
aqua Deals declares *

data Deal:
dealId: string
chainNetwork: string
chainNetworkId: u64
dealIdOriginal: string
definition: string
timestamp: string

data Deals:
dealName: ?Deal

func get() -> Deals:
<- Deals(
dealName=nil
)
4 changes: 4 additions & 0 deletions .fluence/aqua/hosts.aqua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
aqua Hosts declares *

func get() -> ?u8:
<- nil
15 changes: 15 additions & 0 deletions .fluence/aqua/services.aqua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
data ExecutionConfig:
client_id: string
public_key: string
private_key: string
ceramic_endpoint: string
checkpointer_endpoint: string
depin_stream_id: string
proof_of_data_stream_id: string

data SseResponse:
error: string
events: u32

service EventJoiner("event_joiner"):
process_events(cfg: ExecutionConfig) -> SseResponse
7 changes: 7 additions & 0 deletions .fluence/workers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=schemas/workers.json

# A result of app deployment. This file is created automatically after successful deployment using `fluence workers deploy` command

# Documentation: https://github.com/fluencelabs/cli/tree/main/docs/configs/workers.md

version: 0
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
run: make check-fmt
- name: Check clippy
run: make check-clippy
- name: Check generated servers
run: |
make check-checkpointer
test:
runs-on: ubuntu-latest
steps:
Expand All @@ -48,7 +45,10 @@ jobs:
cache-targets: false
- uses: mozilla-actions/[email protected]
- name: Run tests
run: make test
run: |
make test
env:
DID_PRIVATE_KEY: ${{ secrets.DID_PRIVATE_KEY }}
build:
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ permissions:
contents: write

on:
push:
branches: [ "main" ]
paths:
- 'Cargo.toml'
workflow_dispatch:
#push:
# branches: [ "main" ]
# paths:
# - 'Cargo.toml'

jobs:
# Build and packages all the things
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish and Deploy Image

on:
push:
branches: [ "main" ]
#push:
# branches: [ "main" ]
workflow_dispatch:

env:
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
.idea
target
.DS_Store
/.fluence/secrets
/.fluence/env.yaml
/.fluence/schemas
/.fluence/tmp
**/node_modules
**/target/
.repl_history
/.vscode/settings.json
/src/ts/src/aqua
/src/js/src/aqua
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"redhat.vscode-yaml",
"FluenceLabs.aqua"
]
}
Loading

0 comments on commit b4b6292

Please sign in to comment.