Test PR to check GitHub Actions #10
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: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
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: 18 # Matches the version in your project | |
cache: 'npm' | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: npm ci | |
# Step 4: Run format check | |
- name: Format check | |
run: npm run check-format | |
env: | |
CI: true | |
# Step 5: Run linting (optional but recommended) | |
- name: Lint check | |
run: npm run lint | |
env: | |
CI: true | |
# Step 6: Run build check | |
- name: Build check | |
run: npm run build | |
env: | |
CI: true |