-
Notifications
You must be signed in to change notification settings - Fork 89
69 lines (62 loc) · 1.72 KB
/
rust.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
name: Rust
on:
pull_request:
push:
# trying and staging branches are for Bors config
branches:
- trying
- staging
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests with japanese-transliteration on
run: cargo test --verbose --features japanese-transliteration
- name: Run tests with chinese-normalization-pinyin on
run: cargo test --verbose --features chinese-normalization-pinyin
- name: Run tests with swedish-recomposition on
run: cargo test --verbose --features swedish-recomposition
- name: Run irg-kvariants tests
run: cargo test -p irg-kvariants --verbose
clippy:
name: Run Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- --deny warnings
fmt:
name: Run Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Run cargo fmt
run: cargo fmt --all -- --check