Merge pull request #1 from Pradeeparul2/github-workflow #7
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: "Code formattor check" | |
on: | |
push: | |
branches: | |
- "**" # Trigger workflow on push to the main branch | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 # Use the appropriate Node.js version for your project | |
cache: "npm" | |
# Install dependencies | |
- name: Install Dependencies | |
run: npm install | |
# Run linter | |
- name: Run Linter | |
run: npm run lint | |
# Build the project | |
- name: Build Project | |
run: npm run build |