Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Dec 29, 2023
0 parents commit 1ab0b30
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [approvers, m1sk9]
9 changes: 9 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>m1sk9/renovate-config"
],
"addLabels": [
"renovate"
]
}
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build members-assoc-sdk-rust

on:
push:
branches:
- main
- 'release/v*.*.*'
pull_request:
branches:
- main
- 'release/v*.*.*'

jobs:
build:
runs-on: ubuntu-latest
name: Build members-assoc-sdk-rust
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup toolchain
uses: mkroening/rust-toolchain-toml@v1.2.0

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "members-assoc-sdk-rust/gh-actions-cache"

- name: Run Build
run: cargo build --verbose
30 changes: 30 additions & 0 deletions .github/workflows/clippy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: clippy

on:
push:
branches:
- main
- 'release/v*.*.*'
pull_request:
branches:
- main
- 'release/v*.*.*'

jobs:
clippy:
runs-on: ubuntu-latest
name: clippy members-assoc-sdk-rust
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup toolchain
uses: mkroening/rust-toolchain-toml@v1.2.0

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "members-assoc-sdk-rust/gh-actions-cache"

- name: Run clippy
run: cargo clippy --all-targets --all-features
30 changes: 30 additions & 0 deletions .github/workflows/fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: rustfmt

on:
push:
branches:
- main
- 'release/v*.*.*'
pull_request:
branches:
- main
- 'release/v*.*.*'

jobs:
fmt:
runs-on: ubuntu-latest
name: rustfmt members-assoc-sdk-rust
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup toolchain
uses: mkroening/rust-toolchain-toml@v1.2.0

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "members-assoc-sdk-rust/gh-actions-cache"

- name: Run rustfmt
run: cargo fmt --all -- --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
7 changes: 7 additions & 0 deletions Cargo.lock

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

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "members-assoc-sdk-rust"
version = "0.1.0"
edition = "2021"
description = "Rust SDK for approvers/member-assoc"
repository = "https://github.com/approvers/members-assoc-sdk-rust"
readme = "README.md"
license = "MIT"

[dependencies]
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# members-assoc-sdk-rust

Rust SDK for [approvers/members-assoc](https://github.com/approvers/members-assoc).

## Status of support

- [ ] `GET /members`
- [ ] `GET /members/{id}`
- [ ] `GET /members/{id}/associations`

- [ ] `PUT /members/{id}/associations`
- [ ] `DELETE /members/{id}/associations`

Marginal Development Mackerel members can edit and edit their Discord accounts by logging in with their Discord accounts at [Approvers メンバー情報登録](https://members.approvers.dev/).

## Installation

Run `cargo add` or add it to Cargo.toml.

```shell
cargo add members-assoc-sdk-rust
```

```toml
[dependencies]
members-assoc-sdk-rust = "0.1.0"
```

## Usage

```rs
fn main() {
// TODO:
}
```
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "nightly-2023-12-29"
components = ["clippy", "rustfmt"]
14 changes: 14 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

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

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 1ab0b30

Please sign in to comment.