generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 76
57 lines (46 loc) · 1.2 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
54
55
56
57
name: Lint
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Lint SourceCode
runs-on: ubuntu-latest
container:
image: ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Install
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin
toolchain: nightly-2023-04-23
components: clippy, rustfmt
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: lint-cargo-cache
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Download skia binary
run: |
git config --global --add safe.directory $(pwd)
node ./scripts/release-skia-binary.js --download
- name: 'Lint JS/TS'
run: yarn lint
- name: Cargo fmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy