56 lines
1.8 KiB
YAML
56 lines
1.8 KiB
YAML
![]() |
name: Rust CI
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
paths:
|
||
|
- "crates/*"
|
||
|
- "Cargo.lock"
|
||
|
- "Cargo.toml"
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- main
|
||
|
paths:
|
||
|
- "crates/*"
|
||
|
- "Cargo.lock"
|
||
|
- "Cargo.toml"
|
||
|
|
||
|
jobs:
|
||
|
tests:
|
||
|
name: Run Rust tests
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
|
||
|
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # ratchet:Swatinem/rust-cache@v2
|
||
|
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # ratchet:dtolnay/rust-toolchain@master
|
||
|
with:
|
||
|
toolchain: stable
|
||
|
components: clippy, rustfmt
|
||
|
- name: Run rust tests
|
||
|
run: cargo test --features luajit
|
||
|
style:
|
||
|
name: Check Rust style
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
|
||
|
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # ratchet:Swatinem/rust-cache@v2
|
||
|
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # ratchet:dtolnay/rust-toolchain@master
|
||
|
with:
|
||
|
toolchain: stable
|
||
|
components: clippy, rustfmt
|
||
|
- name: Run rustfmt
|
||
|
run: make ruststylecheck
|
||
|
lint:
|
||
|
name: Lint Rust
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
|
||
|
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # ratchet:Swatinem/rust-cache@v2
|
||
|
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # ratchet:dtolnay/rust-toolchain@master
|
||
|
with:
|
||
|
toolchain: "1.80.1"
|
||
|
components: clippy, rustfmt
|
||
|
- name: Run rustfmt
|
||
|
run: make rustlint
|