-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow ci.yaml (#34)
Address compiler warnings given by `cargo check` or `cargo build`. Address coding style issues given by `cargo fmt`. Address issues given by linter, `cargo clippy`. * Remove unnecessary `return`. * Remove unnecessary `to_string`. * Remove comparison of `bool` with `true`/`false`. * Remove unnecessary references. * Remove redundant use `tokio`. * Remove unnecessary `let` binding. * Remove empty strings in `println!()`. * Use `vec![]` macro instead of pushing values to a mutable `Vec`. * Use `&str` instead of `&String` to avoid creating a new object. Add new GitHub Actions workflow `ci.yaml`, which runs `cargo fmt`, `cargo build`, `cargo test`, and `cargo clippy`. Add GitHub CI status banner in `README.md`. ## Testing done `cargo test`, `cargo fmt`, `cargo clippy` passed.
- Loading branch information
1 parent
3068896
commit d19b788
Showing
11 changed files
with
128 additions
and
65 deletions.
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,41 @@ | ||
name: "Run CI" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-test: | ||
name: Build and test azure-provisioning-agent | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- name: Rustfmt Check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all --check | ||
- name: Build azure-provisioning-agent | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --verbose | ||
- name: Run unit tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --verbose | ||
- name: Run clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --verbose -- --deny warnings |
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
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
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
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
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
Oops, something went wrong.