From acb2f6426df00844ef1bd35b288e2aa5bc10640c Mon Sep 17 00:00:00 2001 From: pratishta Date: Mon, 20 May 2024 14:46:13 -0400 Subject: [PATCH] Add code quality workflow Trigger manually for testing purposes Capitalize names Install dependencies with npm ci Update trigger to push to main and PRs Change workflow name to code quality --- .github/workflows/code_quality.yml | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/code_quality.yml diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 00000000..9de49830 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,52 @@ +name: ๐Ÿšง Code quality + +on: + push: + branches: + - main + pull_request: + +jobs: + lint: + name: ๐Ÿ”Ž Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up node env + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install dependencies + run: npm ci + - name: Run lint + run: npm run lint + unit: + name: ๐Ÿงช Unit tests + runs-on: ubuntu-latest + needs: + - lint + steps: + - uses: actions/checkout@v4 + - name: Set up node env + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install dependencies + run: npm ci + - name: Run unit tests + run: npm run test + e2e: + name: ๐ŸŽข End to end tests + runs-on: ubuntu-latest + needs: + - lint + steps: + - uses: actions/checkout@v4 + - name: Set up node env + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install dependencies + run: npm ci + - name: Run end to end tests + run: npm run test:e2e \ No newline at end of file