Skip to content

almost basic img support #295

almost basic img support

almost basic img support #295

Workflow file for this run

on: [push]
name: cargo
jobs:
test:
name: tests
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v4
- uses: taiki-e/install-action@nextest
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: Cache `cargo test`
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-and-${{ hashFiles('src/**') }}
restore-keys: |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-and-
${{ runner.os }}-cargo-test-
- run: cargo nextest run --all-targets --all-features --locked --frozen --offline
- run: cargo nextest run --all-targets --all-features --locked --frozen --offline --release
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- run: rustup component add rustfmt
- uses: actions/checkout@v4
- run: cargo fmt --check --all
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup component add clippy
- uses: actions/checkout@v4
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: Cache `cargo clippy`
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}-and-${{ hashFiles('src/**') }}
restore-keys: |
${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}-and-
${{ runner.os }}-cargo-clippy-
- run: |
cargo clippy \
--locked --frozen --offline --all-targets --all-features \
-- -D warnings --no-deps \
-W clippy::cast_lossless \
-W clippy::redundant_closure_for_method_calls \
-W clippy::str_to_string