Skip to content

clippy: Apply test suggestions. #158

clippy: Apply test suggestions.

clippy: Apply test suggestions. #158

Workflow file for this run

name: Build And Test
on: [push]
env:
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: true
CARGOFLAGS: --workspace --all-targets --all-features
RUST_LOG: trace
jobs:
debug_mode_build:
name: Compile code in debug mode
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
- name: Compile in debug mode
run: cargo build $CARGOFLAGS
- name: Save build artifacts
uses: actions/cache/save@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-debug-build
release_mode_build:
name: Compile code in release mode
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
- name: Compile in release mode
run: cargo build $CARGOFLAGS --release
- name: Save build artifacts
uses: actions/cache/save@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-release-build
debug_mode_test:
name: Test code in debug mode
runs-on: ubicloud-standard-4
needs: debug_mode_build
steps:
- uses: actions/checkout@v4
- name: Restore cached build artifacts
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-debug-build
- name: Run Cargo test in debug mode
run: cargo test $CARGOFLAGS
release_mode_test:
name: Test code in release mode
runs-on: ubicloud-standard-4
needs: release_mode_build
steps:
- uses: actions/checkout@v4
- name: Restore cached build artifacts
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-release-build
- name: Run Cargo test in release mode
run: cargo test $CARGOFLAGS --release