Skip to content

Commit

Permalink
Initial implementation (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
janos authored Jan 6, 2024
1 parent 40c7f4e commit b8d0d5a
Show file tree
Hide file tree
Showing 10 changed files with 1,388 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Rust

on: [push, pull_request]

jobs:
build_and_test:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
fail-fast: true
permissions:
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Cache Cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run Clippy
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
uses: giraffate/clippy-action@v1
with:
reporter: "github-pr-review"
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Audit dependencies
run: cargo audit

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# How to Contribute

We welcome patches and contributions to this project. To ensure consistency and quality, we ask that contributors adhere to the few small guidelines.

## Coding Guidelines

- **Code Formatting**: Ensure your code is formatted according to Rust's standard formatting guidelines. You can use `cargo fmt` to automatically format your code.

- **Documentation**: Exported types, constants, variables, and functions should be documented following Rust's documentation guidelines.

- **Testing**: Changes must be covered with tests. We use `cargo test` to run tests, and all tests must pass. Ensure your new features or fixes include appropriate tests.

- **Versioning**: This Rust client follows [semantic versioning](https://semver.org/). New functionality should be accompanied by an increment to the minor version number.

## Releasing

Releases are made from the `master` branch and should follow these steps:

1. **Update Version Number**: Update the version number in `Cargo.toml` to reflect the new version of the client.

2. **Create a Pull Request**: Make a pull request with the version change and any other relevant updates.

3. **Merge and Release**:
- Once the pull request has been reviewed and merged, go to the [releases page](https://github.com/janos/casbsb-rs/releases) of the repository.
- Click "Draft a new release".
- Set the "Tag version" and "Release title" to the new version of the Rust client, prefixed with `v`, e.g., `v1.2.0`.
- Publish the release.
Loading

0 comments on commit b8d0d5a

Please sign in to comment.