Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #4

Merged
merged 10 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
uses: auguwu/clippy-action@1.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- --deny warnings
args: --deny warnings
- name: Security audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo binstall
uses: cargo-bins/cargo-binstall@main
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: latest
args: '-- --test-threads 1'
run: |
cargo binstall cargo-tarpaulin --no-confirm
cargo tarpaulin
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: cobertura.xml
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ impl Stepgen {
/// If speed or acceleration are not set, returns an error `Error::SpeedAccelerationNotSet`.
///
/// # Notes
/// 1. Steps could only go in positive direction. Therefore, setting target step to 0 wil
/// always force step generation to decelerate and stop.
/// 1. Steps could only go in positive direction. Therefore, setting target step to 0 will
/// always force step generation to decelerate and stop.
pub fn set_target_step(&mut self, target_step: u32) -> Result {
if self.target_delay == 0 || self.first_delay == 0 {
return Err(Error::SpeedAccelerationNotSet);
Expand Down
2 changes: 1 addition & 1 deletion tests/stepgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn test() {

let params: Vec<u32> = file_name.split('_').map(|e| e.parse().unwrap()).collect();

let target_step = *params.get(0).unwrap_or(&1u32);
let target_step = *params.first().unwrap_or(&1u32);
let microsteps = *params.get(1).unwrap_or(&1u32);
let stop_at = *params.get(2).unwrap_or(&std::u32::MAX);

Expand Down
Loading