Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Rust CI

on:
pull_request:
push:
branches: [main]

jobs:
build-and-test:
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/rust-build.yml@rust-build-v2.0.0
with:
rust-version: '1.88.0'
working-directory: "."
enable-cache: true
publish-crates-io: false
14 changes: 14 additions & 0 deletions .github/workflows/conventional-commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Conventional Commit as PR title

on:
pull_request_target:
types:
- opened
- edited
- reopened

jobs:
lint-pr-title:
permissions:
pull-requests: read
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/conventional-commits.yml@conventional-commits-v1.1.0
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release-please:
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/release-please.yml@release-please-v2.0.0
secrets: inherit
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
resolver = "3"
members = ["add"]
6 changes: 6 additions & 0 deletions add/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "add"
version = "0.1.0"
edition = "2024"

[dependencies]
14 changes: 14 additions & 0 deletions add/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"draft-pull-request": true,
"include-component-in-tag": false,
"include-v-in-tag": true,
"packages": {
".": {
"release-type": "rust",
"changelog-path": "CHANGELOG.md"
}
}
}