Test PR to check GitHub Actions #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format and Build Check | |
on: | |
push: | |
branches: | |
- '**' # Triggers on push to any branch | |
pull_request: | |
branches: | |
- '**' # Triggers on pull requests from any branch | |
jobs: | |
format-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Step 2: Set up Node.js | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 # Replace with your Node.js version | |
cache: 'npm' # Use npm for dependency caching | |
# Step 3: Install dependencies without lock file validation | |
- name: Install dependencies | |
run: npm install --no-package-lock | |
# Step 4: Run format check | |
- name: Format check | |
run: npm run format | |
# Step 5: Run build check | |
- name: Build check | |
run: npm run build |