Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,49 @@ jobs:
fi
- run: npx tree-sitter test

ide-extension-version-check:
name: IDE extension version check
if: ${{ !startsWith(github.head_ref, 'release-plz-') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
with:
fetch-depth: 0
- name: Require IDE extension version bump on grammar change
env:
BASE: ${{ github.base_ref }}
run: |
set -euo pipefail
git fetch --depth=1 origin "$BASE"
BASE_REF="origin/$BASE"
fail=0

ts_paths=(
editors/tree-sitter-lisette/grammar.js
editors/tree-sitter-lisette/src
editors/tree-sitter-lisette/queries
)

if git diff --name-only "$BASE_REF..HEAD" -- "${ts_paths[@]}" | grep -q .; then
curr=$(grep -m1 -E '^version[[:space:]]*=' editors/zed/extension.toml | sed -E 's/.*"([^"]+)".*/\1/')
prev=$(git show "$BASE_REF:editors/zed/extension.toml" | grep -m1 -E '^version[[:space:]]*=' | sed -E 's/.*"([^"]+)".*/\1/')
if [ "$curr" = "$prev" ]; then
echo "::error::tree-sitter grammar changed but editors/zed/extension.toml version was not bumped (still $curr)"
fail=1
fi
fi

if git diff --name-only "$BASE_REF..HEAD" -- editors/vscode/syntaxes/lisette.tmLanguage.json | grep -q .; then
curr=$(jq -r .version editors/vscode/package.json)
prev=$(git show "$BASE_REF:editors/vscode/package.json" | jq -r .version)
if [ "$curr" = "$prev" ]; then
echo "::error::editors/vscode/syntaxes/lisette.tmLanguage.json changed but editors/vscode/package.json version was not bumped (still $curr)"
fail=1
fi
fi

exit $fail

e2e-smoke:
name: E2E smoke
if: ${{ !startsWith(github.head_ref, 'release-plz-') }}
Expand Down
Loading