-
Notifications
You must be signed in to change notification settings - Fork 219
65 lines (52 loc) · 1.39 KB
/
formatting.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
name: Formatting
on:
pull_request:
merge_group:
push:
branches:
- master
# This will cancel previous runs when a branch or PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
clippy:
name: cargo clippy
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
env:
RUSTFLAGS: -Dwarnings
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
with:
targets: ${{ matrix.target }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- name: Run `cargo clippy`
run: cargo clippy --workspace --locked --release
- name: Run `cargo fmt`
run: cargo fmt --all --check
eslint:
name: eslint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Yarn dependencies
uses: ./.github/actions/setup
- name: Run `yarn lint`
run: yarn lint