Skip to content

chore(CI): add commlint PoC #2399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Aug 20, 2025
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
26 changes: 23 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ name: 'lint'
on:
workflow_dispatch:
pull_request:
branches:
- main
types: [opened, edited, reopened, synchronize]
branches: [main]

permissions:
contents: read

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
Expand All @@ -47,8 +50,25 @@ jobs:
- run: docker run --rm -e ENABLE_BPMETADATA -v ${{ github.workspace }}:/workspace ${{ steps.variables.outputs.dev-tools }} module-swapper
env:
ENABLE_BPMETADATA: 1

- run: docker run --rm -e ENABLE_BPMETADATA -v ${{ github.workspace }}:/workspace ${{ steps.variables.outputs.dev-tools }} /usr/local/bin/test_lint.sh
env:
ENABLE_BPMETADATA: 1

commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would configuring the npm cache help?

Copy link
Collaborator Author

@apeabody apeabody Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to, but that appears to require a lock file be checked into the repo (or some other method).

- name: Install commitlint
run: |
npm install -D @commitlint/[email protected] @commitlint/[email protected]
echo "module.exports = { extends: ['@commitlint/config-conventional'], };" > commitlint.config.js
npx commitlint --version
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: 'echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose'