-
Notifications
You must be signed in to change notification settings - Fork 285
53 lines (48 loc) · 1.32 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Lints
on:
push:
# Prevent duplicate runs of this workflow on our own internal PRs.
branches:
- main
- next/*
pull_request:
branches:
- main
- next/*
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
rust-toolchain: [nightly]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
components: clippy,rustfmt
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Cache Electron
uses: actions/cache@v4
with:
path: ~/.cache/electron
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
- name: npm install
run: npm ci --prefer-offline --no-audit --no-fund
- name: Prettier Formatting
run: npm run prettier:check
- name: Rust Formatting
run: cargo fmt --all -- --check
- name: Rust Clippy
run: cargo neon-clippy