-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.13 KB
/
lint-backend.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
name: Lint backend
on:
push:
paths:
- '.github/workflows/lint-backend.yml'
- 'package.json'
- 'backend/**/*'
pull_request:
paths:
- '.github/workflows/lint-backend.yml'
- 'package.json'
- 'backend/**/*'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '20'
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build frontend (since it's required to compile)
run: |
cd frontend
npm install
npm run build
cd ..
- name: Cargo format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./backend/Cargo.toml --all -- --check
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ./backend/Cargo.toml --all -- -D warnings