Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/languages/**/snapshots/*.snap linguist-language=YAML
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v6

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
id: rust-toolchain
with:
toolchain: "1.93"
components: rustfmt, clippy

- name: Install nextest
uses: taiki-e/install-action@nextest

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}

- name: Format
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings

- name: Clippy / all-features
run: cargo clippy --all-features --all-targets -- -Dclippy::all -Dunused_imports -Dclippy::uninlined-format-args

- name: Run tests
run: cargo nextest run --all-targets --no-fail-fast

- name: Check for snapshot changes
run: |
if git status --porcelain tests/languages | grep -q "snapshots/"; then
echo "Error: Snapshot files have changed. Run 'cargo insta review' locally and commit the changes."
git diff -- tests/languages/*/snapshots
exit 1
fi
Loading