neon/.github/workflows/lint.yml
K.J. Valencik 111d2ac73c
Simplify clippy lint workflows with the -Zpackage-features RFC
Also adds, `cargo clippy-legacy` and `cargo clippy-napi` aliases
2021-03-13 18:17:23 -05:00

40 lines
900 B
YAML

name: Lints
on:
push:
# Prevent duplicate runs of this workflow on our own internal PRs.
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
rust-toolchain: [nightly]
steps:
- uses: actions/checkout@v2
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install build-essential
run: sudo apt-get install -y build-essential
- name: Formatting
run: cargo fmt --all -- --check
- name: Clippy (N-API)
run: cargo clippy-napi
- name: Clippy (Legacy)
run: cargo clippy-legacy