Skip to content

Commit

Permalink
Merge pull request #146 from Akshay-Vs/master
Browse files Browse the repository at this point in the history
chore: add Husky, configure pre-commit and commit-msg hooks, and set up Commitlint
  • Loading branch information
Buzzpy authored Sep 19, 2024
2 parents bc05692 + 3f3e9db commit f89ad7d
Show file tree
Hide file tree
Showing 6 changed files with 7,587 additions and 6,615 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/astro-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Test Astro App

on:
pull_request:
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Cache npm modules
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install

- name: Build Astro application
run: npm run build

- name: Test Astro application
run: npm run test
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin / env sh

npx commitlint --edit $1
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

npm run test
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// commitlint.config.js

export default { extends: ['@commitlint/config-conventional'] };
Loading

0 comments on commit f89ad7d

Please sign in to comment.