Skip to content

Commit 7063776

Browse files
committed
Add github ci
1 parent edee76e commit 7063776

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: Tests
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest]
12+
lua: [lua51, lua52, lua53, lua54, luau]
13+
steps:
14+
- uses: actions/checkout@main
15+
- name: Cache cargo
16+
uses: actions/cache@main
17+
with:
18+
path: |
19+
~/.cargo
20+
./target
21+
key: test-${{ runner.os }}-${{ matrix.lua }}
22+
- uses: dtolnay/rust-toolchain@stable
23+
- name: Run ${{ matrix.lua }} tests (basic)
24+
run: |
25+
cargo test --features ${{ matrix.lua }},vendored
26+
- name: Run ${{ matrix.lua }} tests (full)
27+
run: |
28+
cargo test --features ${{ matrix.lua }},vendored,json,regex,yaml
29+
30+
rustfmt:
31+
name: Rustfmt
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@main
35+
- uses: dtolnay/rust-toolchain@nightly
36+
with:
37+
components: rustfmt
38+
- run: cargo fmt --all -- --check
39+
40+
clippy:
41+
name: Clippy
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@main
45+
- name: Cache cargo
46+
uses: actions/cache@main
47+
with:
48+
path: |
49+
~/.cargo
50+
./target
51+
key: clippy-${{ runner.os }}
52+
- uses: dtolnay/rust-toolchain@stable
53+
with:
54+
components: clippy
55+
- run: |
56+
cargo clippy --features lua54,vendored,json,regex,yaml -- -D warnings

0 commit comments

Comments
 (0)