Skip to content

Commit 0afd58b

Browse files
authored
Merge pull request #1 from serverlessworkflow/feat-fluent-builders
Add fluent builders crate
2 parents 33bdd12 + 5bb36fd commit 0afd58b

21 files changed

+3182
-45
lines changed

.github/workflows/pipeline.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on pushes to the main branch
7+
pull_request:
8+
branches:
9+
- main # Trigger on pull requests targeting the main branch
10+
workflow_dispatch: # Allow manual triggers
11+
12+
jobs:
13+
build-and-test:
14+
name: Build and Test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Rust
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: stable # Use the stable toolchain
25+
profile: minimal # Install only essential components
26+
override: true
27+
28+
- name: Cache Cargo registry
29+
uses: actions/cache@v3
30+
with:
31+
path: ~/.cargo/registry
32+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-cargo-registry-
35+
36+
- name: Cache Cargo build
37+
uses: actions/cache@v3
38+
with:
39+
path: target
40+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
41+
restore-keys: |
42+
${{ runner.os }}-cargo-build-
43+
44+
- name: Build the project
45+
run: cargo build --workspace --all-targets
46+
47+
- name: Run tests
48+
run: cargo test --workspace --all-targets
49+
50+
release:
51+
name: Publish to crates.io
52+
needs: build-and-test
53+
runs-on: ubuntu-latest
54+
if: github.ref == 'refs/heads/main' # Only run on the main branch
55+
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v3
59+
60+
- name: Set up Rust
61+
uses: actions-rs/toolchain@v1
62+
with:
63+
toolchain: stable
64+
profile: minimal
65+
override: true
66+
67+
- name: Publish to crates.io
68+
run: cargo publish --workspace --allow-dirty
69+
env:
70+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.vscode/launch.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch",
9+
"type": "cppvsdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/target/debug/${workspaceRootFolderName}.exe",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}",
15+
"environment": [],
16+
"externalConsole": true,
17+
"preLaunchTask": "cargo build"
18+
}
19+
]
20+
}

Cargo.lock

+19-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
22
members = [
3-
"core"
3+
"core",
4+
"builders"
45
]

builders/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "serverless-workflow-builders"
3+
version = "1.0.0-alpha6"
4+
edition = "2021"
5+
authors = ["The Serverless Workflow Authors <[email protected]>"]
6+
description = "Contains services used to build ServerlessWorkflow workflow definitions programatically"
7+
homepage = "https://serverlessworkflow.io"
8+
repository = "https://github.com/serverlessworkflow/sdk-rust"
9+
documentation = "https://github.com/serverlessworkflow/sdk-rust"
10+
license = "Apache-2.0"
11+
keywords = ["serverless-workflow", "serverless", "workflow", "dsl", "sdk", "builders", "services"]
12+
categories = ["dsl", "sdk", "builders", "services"]
13+
14+
[dependencies]
15+
serverless_workflow_core = { path = "../core" }
16+
serde_json = "1.0"
17+
serde_yaml = "0.9"

0 commit comments

Comments
 (0)