From 12b68b9a92ee02918762def0fb54687ede3c9449 Mon Sep 17 00:00:00 2001 From: Niyonkuru Bertin <85437905+niyobertin@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:47:24 +0200 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9591176 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ + +name: Eagle e-commerce CI/CD + +on: + push: + branches: + - main + - dev + + pull_request: + branches: + - main + - dev + + workflow_dispatch: + +jobs: + build: + name: Building code + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: "20" + + - name: Install dependencies + run: npm install + + - name: Running test + run: npm run test + + - name: Build application + run: npm run build + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }}