mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 20:19:24 +00:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get nightly version to use
|
|
id: nightly
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build Dependencies
|
|
uses: ./.github/actions/build-dependencies
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
rust-toolchain: ${{ steps.nightly.outputs.version }}
|
|
rust-components: clippy
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
|
|
|
|
deny:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Advisory Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cargo/advisory-db
|
|
key: rust-advisory-db
|
|
|
|
- name: Install cargo
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install cargo deny
|
|
run: cargo install --locked cargo-deny
|
|
|
|
- name: Run cargo deny
|
|
run: cargo deny -L error --all-features check
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get nightly version to use
|
|
id: nightly
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install rustfmt
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ steps.nightly.outputs.version }}
|
|
components: rustfmt
|
|
|
|
- name: Run rustfmt
|
|
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check
|