Merge pull request #57 from Bhavyajain21/feat/github-workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs ESLint, Prettier, unit tests, and e2e tests using pnpm. | |
name: CI | |
on: | |
push: | |
branches: | |
- "!main" | |
- "!develop" | |
- "*" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run Prettier (Pre-commit or in workflow) | |
run: pnpm lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run ESLint | |
run: pnpm lint | |
- name: Run unit tests | |
run: pnpm run test:unit | |
- name: Run e2e tests | |
run: pnpm run test:e2e |