78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
on: [push, pull_request]
|
|
|
|
name: Nightly lints
|
|
|
|
jobs:
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install nightly toolchain with clippy available
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
components: clippy
|
|
|
|
- name: Run cargo clippy
|
|
uses: actions-rs/cargo@v1
|
|
continue-on-error: true # WARNING: only for this example, remove it!
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|
|
|
|
rustfmt:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install nightly toolchain with rustfmt available
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: Run cargo fmt
|
|
uses: actions-rs/cargo@v1
|
|
continue-on-error: true # WARNING: only for this example, remove it!
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
combo:
|
|
name: Clippy + rustfmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install nightly toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Run cargo fmt
|
|
uses: actions-rs/cargo@v1
|
|
continue-on-error: true # WARNING: only for this example, remove it!
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
- name: Run cargo clippy
|
|
uses: actions-rs/cargo@v1
|
|
continue-on-error: true # WARNING: only for this example, remove it!
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|
|
|