Skip to content

Commit

Permalink
Add cargo lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Jul 23, 2023
1 parent fd0a0ac commit 65f8d38
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master

jobs:
cargolint:
name: Rust lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Add required index.html
run: |
touch ./static/index.html
- uses: actions-rs/cargo@v1
with:
command: clippy

0 comments on commit 65f8d38

Please sign in to comment.