name: CI on: [push, pull_request] env: PNPM_CACHE_FOLDER: .pnpm-store SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks jobs: commitlint: # Skip job if PR is from Dependabot if: github.actor != 'dependabot[bot]' runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: pnpm - name: Install dependencies run: pnpm install - name: Validate current commit (last commit) with commitlint if: github.event_name == 'push' run: pnpm commitlint --last --verbose - name: Validate PR commits with commitlint if: github.event_name == 'pull_request' run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose