make linting a separate job from tests

This commit is contained in:
Anton Suprunchuk
2021-10-09 21:12:58 +03:00
parent 8622f9cb47
commit 03f9bbbc40

View File

@@ -7,7 +7,7 @@ on:
branches: [ master ]
jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -17,9 +17,19 @@ jobs:
toolchain: stable
profile: minimal
override: true
- name: Install Clippy
run: rustup component add clippy
- name: Run linter
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Clippy
run: rustup component add clippy
- name: Run linter
run: cargo clippy -- -D warnings