1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-30 04:29:10 +01:00

Add rust.yml

This commit is contained in:
Caleb Bassi 2019-10-28 19:08:31 -07:00 committed by GitHub
parent 09e46fce89
commit 52c760bac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

71
.github/workflows/rust.yml vendored Normal file
View File

@ -0,0 +1,71 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
on: [push, pull_request]
name: Rust
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings