Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Add format check and linting action pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed May 3, 2024
1 parent f77804f commit 0f7d7d9
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,56 @@ on:
workflow_dispatch:

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: x86_64-unknown-linux-gnu-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Check fmt
run: cargo fmt --check

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: x86_64-unknown-linux-gnu-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Lint
run: cargo clippy -- -D warnings

build-linux:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit 0f7d7d9

Please sign in to comment.