diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..ce0f227 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,34 @@ +# This runs `cargo audit` on all dependencies (only if Cargo deps changed) + +name: Audit + +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + +env: + CARGO_TERM_COLOR: always + +jobs: + audit: + + runs-on: ubuntu-latest + + steps: + - name: Cache + uses: actions/cache@v3.2.3 + with: + path: | + ~/.cargo + target + key: audit + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install dependencies + run: cargo install cargo-audit --locked + - name: Audit + run: cargo audit + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc9b730..49a937e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,6 @@ jobs: fi shell: bash - - name: Test - run: cargo test --release - name: Build run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..f758271 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,64 @@ +name: Rust + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Format + run: cargo fmt --all --check + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + - name: Test + run: cargo test + typo: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Spell Check + uses: crate-ci/typos@master + clippy: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + - name: Clippy (fail on warnings) + run: cargo clippy -- -D warnings + check: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + - name: Check compilation + run: cargo check --verbose + doc: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + - name: Documentation + run: cargo doc --no-deps diff --git a/src/app/panels/middle/xmrig.rs b/src/app/panels/middle/xmrig.rs index 00e1356..239bcbf 100644 --- a/src/app/panels/middle/xmrig.rs +++ b/src/app/panels/middle/xmrig.rs @@ -175,7 +175,7 @@ impl Xmrig { ui.horizontal(|ui| { ui.add_sized( [text_width, text_edit], - Label::new(format!("Pause on active [0-255]:")), + Label::new("Pause on active [0-255]:".to_string()), ); ui.add_sized([width, text_edit], Slider::new(&mut self.pause, 0..=255)) .on_hover_text(format!("{} [{}] seconds.", XMRIG_PAUSE, self.pause));