Skip to content

merge: develop → main (bump GitHub Actions) #13

merge: develop → main (bump GitHub Actions)

merge: develop → main (bump GitHub Actions) #13

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v6
- name: Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check
- name: Build
run: npm run build --if-present
- name: Test
run: npm test --if-present
commitlint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Node.js
uses: actions/setup-node@v6
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Validate PR commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose