Bumps the actions group with 2 updates: [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action). Updates `Swatinem/rust-cache` from 2.9.2 to 2.9.3 - [Release notes](https://github.com/swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/swatinem/rust-cache/compare/6323deb102c322ba6fcbdcafc7e3dddab59af2b6...d1527c8f67ef9af357290475d4af4b0fab8f12e0) Updates `zizmorcore/zizmor-action` from 0.7.1 to 0.8.0 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](https://github.com/zizmorcore/zizmor-action/compare/85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e...53290badfa369cb0bf7ad16342cb62c2fa47ac7b) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-version: 2.9.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: zizmorcore/zizmor-action dependency-version: 0.8.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
name: Rust
|
|
|
|
# The Tauri shell changes rarely, so this only runs when it does (or weekly,
|
|
# to catch new RustSec advisories). Not a required check for that reason.
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "src-tauri/**"
|
|
- ".github/workflows/rust.yml"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "src-tauri/**"
|
|
- ".github/workflows/rust.yml"
|
|
schedule:
|
|
- cron: "41 4 * * 1"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: rust-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev \
|
|
libayatana-appindicator3-dev librsvg2-dev patchelf
|
|
# Pinned to a commit on master, with the toolchain passed explicitly: the
|
|
# action's `stable` branch is regenerated from master, which orphans any
|
|
# SHA pinned there (zizmor: impostor-commit). Master keeps its history.
|
|
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8
|
|
with:
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
with:
|
|
workspaces: src-tauri
|
|
# tauri::generate_context!() embeds the frontend at compile time, so
|
|
# clippy and the tests need a built dist/.
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version-file: .node-version
|
|
cache: npm
|
|
- run: npm ci --ignore-scripts
|
|
- run: npm run build
|
|
- name: rustfmt
|
|
working-directory: src-tauri
|
|
run: cargo fmt --all -- --check
|
|
- name: clippy
|
|
working-directory: src-tauri
|
|
run: cargo clippy --all-targets --locked -- -D warnings
|
|
- name: test
|
|
working-directory: src-tauri
|
|
run: cargo test --locked
|
|
|
|
# RustSec advisories, license allowlist, duplicate/banned crates and
|
|
# registry sources for the whole crate tree (src-tauri/deny.toml).
|
|
cargo-deny:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
|
|
with:
|
|
manifest-path: src-tauri/Cargo.toml
|
|
command: check advisories licenses sources
|