Skip to content

Code Format Check

Code Format Check #26

Workflow file for this run

name: Code Format Check
on:
push:
paths:
- '**/*.js'
- '**/*.json'
- '**/*.md'
- '.prettierrc'
- '.prettierignore'
- 'package.json'
- 'package-lock.json'
pull_request:
paths:
- '**/*.js'
- '**/*.json'
- '**/*.md'
- '.prettierrc'
- '.prettierignore'
- 'package.json'
- 'package-lock.json'
schedule:
# Run weekly on Saturdays at 4 AM UTC
- cron: '0 4 * * 6'
jobs:
check-format:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check code formatting
run: npm run format:check -- --ignore-path .prettierignore
- name: Upload format check results
uses: actions/upload-artifact@v4
if: always()
with:
name: format-check-results-${{ matrix.node-version }}
path: |
format-check-results/
*.log
retention-days: 7