Skip to content

add lint job

add lint job #5

Workflow file for this run

name: Pipeline
on:
push:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
- name: Check Format
run: cargo fmt --check
- name: Run Clippy
run: cargo clippy
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ['stable', 'nightly']
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Build
run: cargo build --verbose
- name: Run Tests
run: cargo test --verbose