-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (40 loc) · 1.07 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
name: "lint"
on:
- push
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
- name: Check formatting
run: cargo make fmt-check
ktlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin # See 'Supported distributions' for available options
java-version: 17
- name: Download ktlint
run: |
curl -sSL https://api.github.com/repos/pinterest/ktlint/releases/latest |
jq '.assets[].browser_download_url | select(endswith("ktlint"))' |
xargs curl -sSLO
chmod +x ktlint
- name: Run ktlint
run: |
cd android
../ktlint