Skip to content

Commit

Permalink
chore: optimize commit lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DIY0R committed Sep 4, 2024
1 parent db62ee9 commit b223d43
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install required dependencies
run: |
sudo apt update
sudo apt install -y sudo
sudo apt install -y git curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
- name: Print versions
run: |
git --version
node --version
npm --version
npx commitlint --version

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'

- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install commitlint
run: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest
npm install -g commitlint@latest @commitlint/{config-conventional,cli}@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
Expand All @@ -46,23 +46,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 20
- 21
- 22
os:
- ubuntu-latest
- windows-latest
- macos-latest
node-version: [20.x]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Use Node.js ${{ matrix.node }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install
Expand Down

0 comments on commit b223d43

Please sign in to comment.