Skip to content

Added fmt and clippy workflow from Reveaal #25

Added fmt and clippy workflow from Reveaal

Added fmt and clippy workflow from Reveaal #25

Workflow file for this run

name: Check formatting
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: false
- run: cargo fmt --all -- --check
clippy:
name: Clippy lint and check
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install llvm protobuf-compiler glibc-source libgtk-3-dev libsoup2.4 webkit2gtk-4.0 javascriptcoregtk-4.0 npm
- uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- run: npm i -g --force yarn node
- name: Install yarn dependencies
run: yarn --cwd ./Ecdar-GUI-Web install
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: clippy --all-targets --all-features
uses: actions-rs/clippy-check@v1
with:
token : ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings