mirror of
https://github.com/storytold/craft-libs.git
synced 2026-10-31 15:49:54 +00:00
tests/mutation.rs runs a seeded mutation pass over the test images and small SOF9, SOF10 and 12-bit seeds, checking that decode never panics and stays within small limits. fuzz/ is a cargo-fuzz crate (own workspace) with a decode target and those seeds. jpeg.yml runs fmt, clippy, tests and a wasm32 check on Linux. The README gains a testing section.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Shared JPEG
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ["crates/jpeg/**", "Cargo.toml", "Cargo.lock", ".github/workflows/jpeg.yml"]
|
|
pull_request:
|
|
paths: ["crates/jpeg/**", "Cargo.toml", "Cargo.lock", ".github/workflows/jpeg.yml"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: shared-jpeg-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
timeout-minutes: 10
|
|
name: JPEG lint, tests, WASM
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
targets: wasm32-unknown-unknown
|
|
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
with:
|
|
key: craft-jpeg
|
|
- run: cargo fmt -p craft-jpeg --check
|
|
- run: cargo clippy -p craft-jpeg --all-targets --locked -- -D warnings
|
|
- run: cargo test -p craft-jpeg --locked
|
|
- run: cargo check -p craft-jpeg --locked --target wasm32-unknown-unknown
|