Merge pull request #565 from middlewarehq/remove-cal-link #5
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: Linting-Precommit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pre_job: | |
name: Path match check | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
paths_ignore: '["**.po", "**.json"]' | |
linting: | |
name: All file linting | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies for cli | |
run: yarn add eslint@^8.40.0 eslint-plugin-import@^2.29.0 eslint-plugin-prettier@^5.0.1 eslint-plugin-react@^7.29.4 eslint-plugin-unused-imports@^3.0.0 --dev | |
working-directory: cli | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies for web-server | |
run: yarn add eslint@^8.40.0 [email protected] eslint-plugin-import@^2.29.0 eslint-plugin-prettier@^5.0.1 eslint-plugin-react@^7.29.4 eslint-plugin-unused-imports@^3.0.0 --dev | |
working-directory: web-server | |
- name: Run pre-commit hooks | |
uses: pre-commit/[email protected] |