fix: Add debounce to cart #146
Workflow file for this run
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
name: React Lint on PR | |
on: | |
pull_request: | |
paths: | |
- "apps/dashboard/**" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20.12" | |
- name: Install pnpm | |
run: npm install -g [email protected] | |
- name: Install dependencies | |
run: cd apps/dashboard && pnpm install | |
- name: Get list of changed files | |
id: getfile | |
run: | | |
echo "Changed files:" | |
git fetch origin ${{ github.event.pull_request.base.ref }} # fetch the base branch | |
files=$(git diff --name-only FETCH_HEAD..HEAD | grep 'apps/dashboard/.*\.\(js\|jsx\|ts\|tsx\)$' | sed 's#apps/dashboard/##') | |
echo "$files" | |
echo "FILES=$files" >> $GITHUB_ENV | |
- name: Run ESLint on changed files | |
run: cd apps/dashboard && pnpm run ci-eslint-check -- ${{ env.FILES }} | |
- name: Run Prettier on changed files | |
run: cd apps/dashboard && pnpm run ci-prettier-check -- ${{ env.FILES }} |