-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,388 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.