From 6eb507474996b6c0bd63b8625b233e0475ff0d3c Mon Sep 17 00:00:00 2001 From: Nishant Date: Thu, 27 Feb 2025 11:39:04 +0530 Subject: [PATCH] Added CI workflow --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e808266 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.19.0 # Ensure compatibility with Next.js + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run Linting + run: npm run lint + + - name: Run Tests + run: npm test + + - name: Run Tests with Coverage + run: npm run test:coverage + + - name: Build the Project + run: npm run build \ No newline at end of file