Skip to content

refactor: use eslint #9

refactor: use eslint

refactor: use eslint #9

Workflow file for this run

name: "CI - Master: Build, Test & Lint"
on:
push:
branches:
- master
paths-ignore:
- "**/*.md"
permissions: {}
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install zizmor
run: |
pipx install zizmor
- name: Setup Node.js environment
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
package-manager-cache: false
- name: Install dependencies
run: |
npm ci
- name: Build
run: |
npm run build
- name: Test
run: |
npm run test
- name: Lint code
run: |
npm run lint:all
- name: Lint commit
run: |
if [[ "${BASE_SHA}" = "0000000000000000000000000000000000000000" ]]; then
npx commitlint --to HEAD --verbose
else
npx commitlint --from "${BASE_SHA}" --to "${HEAD_SHA}" --verbose
fi
env:
BASE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.event.head_commit.id }}