Skip to content

Commit

Permalink
Add fmt and clippy workflow from Reveaal (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton <[email protected]>
  • Loading branch information
KamyaPA and atjn authored Dec 11, 2023
1 parent 92f35d1 commit 5a26c1b
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test_format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Check formatting

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
fmt:
name: Cargo fmt lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: Swatinem/rust-cache@v2

- name: Run fmt lint
run: cargo fmt --all -- --check

clippy:
name: Cargo clippy lint
runs-on: ubuntu-latest
steps:

# DO NOT EDIT THIS MANUALLY, please only use the official installation instructions from:
# https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux
- name: Install native Tauri dependencies
run: sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

- name: Install protobuf compiler
run: sudo apt-get install protobuf-compiler

- uses: actions/checkout@v4
with:
submodules: true

- uses: Swatinem/rust-cache@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
cache-dependency-path: 'Ecdar-GUI-Web/yarn.lock'

- name: Install yarn dependencies
run: cd Ecdar-GUI-Web && yarn install

- name: Run clippy lint
run: cargo clippy --all-targets -- -D warnings

0 comments on commit 5a26c1b

Please sign in to comment.