From 5519d607c6554ecbde2ba71b0753e5915aa3d63a Mon Sep 17 00:00:00 2001 From: Gaurav Gusain Date: Sun, 4 Feb 2024 18:47:09 +0530 Subject: [PATCH] refactor: ci.yml file --- .github/workflows/ci.yml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7966c1f..cabdbbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,32 +1,23 @@ -name: React App CI -# Controls when the action will run. +name: Ikea CI + on: - # Triggers the workflow on push or pull request events but only for the master branch push: branches: [main, develop] pull_request: branches: [main, develop] -# A workflow run is made up of one or more jobs that can run sequentially or in parallel + jobs: - react-app-workflow: - # The type of runner that the job will run on + build: runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job + steps: - uses: actions/checkout@v2 - - name: Use Node.js 14.x + with: + fetch-depth: 0 # 👈 Required to retrieve git history + - name: Use Node.js 18.x uses: actions/setup-node@v2 with: - node-version: 14.x - - name: npm ci - run: npm ci - - name: test - run: npm test - - name: format - run: npm run prettier - - name: lint - run: npm run lint - - name: typescript - run: npm run typescript - - name: build - run: npm run build --if-present + node-version: 18.x + cache: 'npm' + - run: npm ci + - run: npm run validate \ No newline at end of file