mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* modernize github workflows this mainly fixes some inconsistencies in style, outdated or wrong comments and action version - replace Legit-Labs/action-download-artifact with actions/download-artifact - fix Swatinem/rust-cache arguments - fix benchmark transformations - expand feature soundness lints - wording and capitalization in comments * fix no_run on crate level doc * fix some more small issues
78 lines
1.6 KiB
YAML
78 lines
1.6 KiB
YAML
name: Clippy
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/clippy.yml"
|
|
- "tools/**/*"
|
|
- "examples/**/*"
|
|
- "packages/**/*"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
feature-soundness:
|
|
name: Feature Soundness
|
|
runs-on: ubuntu-latest
|
|
# if normal clippy doesn't succeed, do not try to lint feature soundness
|
|
needs: clippy
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
profile:
|
|
- dev
|
|
- release
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: clippy
|
|
|
|
- name: Lint feature soundness
|
|
if: matrix.profile == 'dev'
|
|
run: bash ./ci/feature-soundness.sh
|
|
|
|
- name: Lint feature soundness
|
|
if: matrix.profile == 'release'
|
|
run: bash ./ci/feature-soundness-release.sh
|
|
|
|
clippy:
|
|
name: Clippy Workspace
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: clippy
|
|
|
|
- name: Run clippy
|
|
run: |
|
|
cargo clippy \
|
|
--all-targets \
|
|
--all-features \
|
|
--workspace \
|
|
-- -D warnings
|