mirror of
https://github.com/EasyTier/EasyTier.git
synced 2024-11-16 19:58:27 +08:00
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
|
name: Check
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
paths:
|
||
|
- ".github/workflows/check.yml"
|
||
|
- "**/*.rs"
|
||
|
- "**/Cargo.toml"
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- main
|
||
|
paths:
|
||
|
- ".github/workflows/check.yml"
|
||
|
- "**/*.rs"
|
||
|
- "**/Cargo.toml"
|
||
|
|
||
|
concurrency:
|
||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||
|
cancel-in-progress: true
|
||
|
|
||
|
jobs:
|
||
|
fmt:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
- uses: dtolnay/rust-toolchain@stable
|
||
|
with:
|
||
|
components: rustfmt
|
||
|
- run: cargo fmt --all -- --check
|
||
|
|
||
|
clippy:
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||
|
|
||
|
runs-on: ${{ matrix.platform }}
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
- uses: dtolnay/rust-toolchain@stable
|
||
|
with:
|
||
|
components: clippy
|
||
|
- name: install webkit2gtk
|
||
|
if: matrix.platform == 'ubuntu-latest'
|
||
|
run: |
|
||
|
sudo apt-get update
|
||
|
sudo apt-get install -y webkit2gtk-4.1
|
||
|
- uses: Swatinem/rust-cache@v2
|
||
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|