name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Lint
run: cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --locked --all-targets --all-features
- name: Fixture acceptance
shell: bash
run: |
out_dir="$(mktemp -d)"
cargo run --locked -- scan \
--root tests/fixtures/tauri-custom-plugin \
--repo fixture \
--out "$out_dir"
cargo run --locked -- validate --input "$out_dir"