mirror of
https://github.com/ribru17/ts_query_ls.git
synced 2025-12-23 05:36:52 +00:00
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: ['master']
|
|
pull_request:
|
|
branches: ['master']
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.86.0
|
|
id: toolchain
|
|
with:
|
|
components: clippy
|
|
- run: cargo clippy --tests --no-deps -- -D warnings
|
|
|
|
format:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.86.0
|
|
id: toolchain
|
|
with:
|
|
components: rustfmt
|
|
- run: cargo fmt --check
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.86.0
|
|
id: toolchain
|
|
- run: cargo test
|
|
|
|
generate-schema:
|
|
name: Generate schema
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.86.0
|
|
id: toolchain
|
|
- name: Check schema generation
|
|
run: |
|
|
# Generate schema
|
|
cargo xtask schema
|
|
# Check for uncommitted changes
|
|
if [[ -n "$(git status --porcelain)" ]]; then
|
|
echo '❌ Uncommitted changes detected after running `cargo xtask schema`:'
|
|
git --no-pager diff
|
|
exit 1
|
|
else
|
|
echo "✅ No changes; schema is up to date."
|
|
fi
|