langflow/.github/workflows/lint-js.yml
Gabriel Luiz Freitas Almeida 26a71e1c36
ci: add auto_merge_enabled to PR activity types and concurrency settings (#2471)
* ci: add auto_merge_enabled to pr activity types

* fix  (auto-update.yml): remove 'dev' branch from trigger to run workflow on 'main' branch pushes only

fix (js_autofix.yml): remove unnecessary push trigger for 'main' branch in workflow to run on specific file changes only

* ci: Update concurrency settings in CI workflows
2024-07-01 18:45:15 -07:00

52 lines
1.1 KiB
YAML

name: Lint Frontend
on:
pull_request:
paths:
- "src/frontend/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "21"
jobs:
run-linters:
name: Run Prettier
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
id: setup-node
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache Node.js dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('src/frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js dependencies
run: |
cd src/frontend
npm install
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
- name: Run Prettier
run: |
cd src/frontend
npm run check-format