-
-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (61 loc) · 2.29 KB
/
linting.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on:
push:
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
name: linting
steps:
- name: checkout codebase
uses: actions/checkout@v4
with:
submodules: true
### Install languages ###
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: setup rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
### Install language dependencies ###
- name: install yarn
run: npm install --global yarn
- name: install script dependencies
run: yarn install --frozen-lockfile
- name: install rust development tools
uses: taiki-e/install-action@cargo-llvm-cov
- name: install rust dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
### Apply cache ###
- name: generate Cargo.lock
run: cargo generate-lockfile
working-directory: ./src/core
- name: cache rust dependencies
uses: swatinem/rust-cache@v2
with:
workspaces: "./src/core -> target"
- name: configure rust compiler cache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: cache rust compiler
uses: mozilla-actions/[email protected]
### Build client ###
- name: install node dependencies
run: yarn install --frozen-lockfile
working-directory: ./src/ui
- name: build ui
run: yarn run build
working-directory: ./src/ui
### Linting ###
- name: run clippy
run: cargo clippy --all-targets --all-features
working-directory: ./src/core
- name: run eslint
run: yarn run lint
working-directory: ./src/ui