1
0
mirror of https://github.com/danog/ytop.git synced 2024-12-03 09:57:50 +01:00
ytop/.github/workflows/rust-ci.yml

83 lines
1.8 KiB
YAML
Raw Normal View History

2019-10-29 03:08:31 +01:00
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
2019-10-29 19:31:51 +01:00
name: Rust-CI
2019-10-29 03:08:31 +01:00
2019-10-29 19:31:51 +01:00
on: [push, pull_request]
2019-10-29 03:08:31 +01:00
jobs:
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:
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
2019-10-29 19:31:51 +01:00
rustfmt:
2019-10-29 03:08:31 +01:00
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
2019-10-29 19:31:51 +01:00
components: rustfmt
2019-10-29 03:08:31 +01:00
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
2019-10-29 19:31:51 +01:00
clippy:
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: clippy
2019-10-29 03:08:31 +01:00
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings