-
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.
Merge pull request #4 from saeidakbari/develop
Adding CI, Enhance Readme
- Loading branch information
Showing
3 changed files
with
54 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,49 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" , "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy, rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check | ||
run: cargo clippy --workspace --all-targets --all-features | ||
- name: rustfmt | ||
run: cargo fmt --all --check | ||
|
||
test: | ||
needs: ["check", "dependencies-are-sorted"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/install-action@protoc | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run tests | ||
run: cargo test --workspace --all-features --all-targets | ||
|
||
dependencies-are-sorted: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-sort | ||
run: | | ||
cargo install cargo-sort | ||
# Work around cargo-sort not honoring workspace.exclude | ||
- name: Check dependency tables | ||
run: | | ||
cargo sort --workspace --grouped --check |
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
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