Skip to content

Commit

Permalink
Merge pull request #5 from jeandudey/2020_06_20-workflows
Browse files Browse the repository at this point in the history
.github: add Rust actions
  • Loading branch information
jeandudey authored Jun 20, 2020
2 parents 0fc147e + 9d5b5c8 commit 35fd0d1
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: jeandudey
88 changes: 88 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md

on: [push, pull_request]

name: MSRV

jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Install libudev-dev
run: sudo apt-get install libudev-dev

- name: Run cargo check
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: check
fmt:
name: Rustfmt
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Install rustfmt
run: rustup component add rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Install clippy
run: rustup component add clippy

- name: Install libudev-dev
run: sudo apt-get install libudev-dev

- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- -D warnings

0 comments on commit 35fd0d1

Please sign in to comment.