-
Notifications
You must be signed in to change notification settings - Fork 71
82 lines (75 loc) · 2.02 KB
/
test.yml
File metadata and controls
82 lines (75 loc) · 2.02 KB
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
77
78
79
80
81
82
name: Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@master
reformat:
name: Code Style Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install pre-commit
run: pip install pre-commit
- name: Run style check
run: pre-commit run --all --hook-stage manual
clippy:
name: Clippy Lint Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run Tests
run: cargo test --workspace --features emmylua_ls/full-test
check-schema:
name: Check schema generation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Check schema
run: |
# Generate schema
cargo run --bin schema_json_gen
# Check for uncommitted changes
if [[ -n "$(git status --porcelain)" ]]; then
echo '❌ Uncommitted changes detected after running `cargo run --bin schema_json_gen`:'
git --no-pager diff
exit 1
else
echo "✅ No changes — schema is up to date."
fi