Skip to content

Update rule of commit #1483

Update rule of commit

Update rule of commit #1483

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
workflow_dispatch:
push:
branches:
- main
jobs:
build:
if: github.repository_owner == 'AxaFrance'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "*" # Use the LTS Node.js version
cache: "npm"
- run: npm run package:check
- run: npm ci
- run: npm run build
- run: npm run lint -- --max-processes 1
- run: npm run test
- name: SonarCloud Scan
if: github.event.pull_request.head.repo.full_name == github.repository
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
commitlint:
if: github.event_name == 'pull_request'
name: CommitLint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "*" # Use the LTS Node.js version
cache: "npm"
- run: npm ci
# https://commitlint.js.org/guides/ci-setup.html#github-actions
- name: Validate PR commits with commitlint
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose --color