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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,34 @@ env:
NVIM_TYPECHECK_VERSION: v0.12.2

jobs:
commit-style:
runs-on: ubuntu-latest
name: Conventional commits
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
# Skip GitHub's synthetic merge commit (would fail `cz check`).
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install commitizen
run: pip install commitizen

- name: Lint commits
run: |
range="origin/${{ github.base_ref }}..HEAD"
if [ -z "$(git rev-list "$range")" ]; then
echo "No new commits vs base; skipping cz check."
exit 0
fi
cz check --rev-range "$range"

lint:
runs-on: ubuntu-latest
name: Lint (stylua)
Expand Down
Loading