2021-09-28 02:15:17 +03:00
|
|
|
{{{{raw}}}}
|
2024-04-02 19:59:26 +03:00
|
|
|
name: Check
|
2021-09-28 02:15:17 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-04-02 19:59:26 +03:00
|
|
|
paths:
|
|
|
|
- ".github/workflows/check.yml"
|
|
|
|
- "**/*.rs"
|
|
|
|
- "**/Cargo.toml"
|
2021-09-28 02:15:17 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-04-02 19:59:26 +03:00
|
|
|
paths:
|
|
|
|
- ".github/workflows/check.yml"
|
|
|
|
- "**/*.rs"
|
|
|
|
- "**/Cargo.toml"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-09-28 02:15:17 +03:00
|
|
|
|
|
|
|
jobs:
|
2024-04-02 19:59:26 +03:00
|
|
|
fmt:
|
2021-09-28 02:15:17 +03:00
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 19:59:26 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
components: rustfmt
|
|
|
|
- run: cargo fmt --all -- --check
|
|
|
|
|
|
|
|
clippy:
|
2021-09-28 02:15:17 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2024-04-02 19:59:26 +03:00
|
|
|
matrix:
|
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
2021-09-28 02:15:17 +03:00
|
|
|
|
2024-04-02 19:59:26 +03:00
|
|
|
runs-on: ${{ matrix.platform }}
|
2023-04-03 16:01:59 +03:00
|
|
|
|
2024-04-02 19:59:26 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
components: clippy
|
|
|
|
- name: install webkit2gtk
|
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
2021-09-28 02:15:17 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-01-29 21:08:27 +03:00
|
|
|
sudo apt-get install -y webkit2gtk-4.1
|
2023-04-03 16:01:59 +03:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2024-04-02 19:59:26 +03:00
|
|
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
2021-09-28 02:15:17 +03:00
|
|
|
{{{{/raw}}}}
|