blob: e9b6fff892de01a638ddf52bceca1cca1f3fae8e [file] [log] [blame]
name: Lint
on:
pull_request:
branches: [master, main]
push:
branches: [staging, trying]
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v2
- name: OpenSSL Libs
if: matrix.os == 'ubuntu-latest' && matrix.features == 'all'
run: |
sudo apt-get update
sudo apt-get install libssl-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: clippy, rustfmt
toolchain: ${{ matrix.rust }}
override: true
- uses: Swatinem/rust-cache@v1
- name: Spell Check
uses: crate-ci/typos@master
- name: Install Just
if: ${{ matrix.rust == 'nightly' || matrix.rust == 'stable' }}
run: cargo install just
- name: Check Formatting
if: ${{ matrix.rust == 'nightly' }}
run: just fmt-check
- name: Clippy
if: ${{ matrix.rust == 'stable' }}
run: just lint
- name: MSRV Check
if: ${{ matrix.rust == '1.65.0' }}
run: cargo check