From 44f7c6cdd3cdc558a0c0f1c1f5b300ea9baa4a6e Mon Sep 17 00:00:00 2001 From: Himanshu Sharma Date: Mon, 8 Jul 2024 17:11:53 +0530 Subject: [PATCH] =?UTF-8?q?Frontend=20ci=20pipeline=20=F0=9F=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-front.yml | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci-front.yml diff --git a/.github/workflows/ci-front.yml b/.github/workflows/ci-front.yml new file mode 100644 index 0000000..82ca3fc --- /dev/null +++ b/.github/workflows/ci-front.yml @@ -0,0 +1,42 @@ +name: Frontend CI pipeline + +on: + push: + branches: + - master + paths: + - "mango-frontend/**" + pull_request: + branches: + - master + paths: + - "mango-frontend/**" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "20" + + - name: Install dependencies + run: npm ci + working-directory: mango-frontend + + - name: Lint code + run: npm run lint + working-directory: mango-frontend + + - name: Build project + run: npm run build + working-directory: mango-frontend + + - name: Run tests + run: npm test + working-directory: mango-frontend