Skip to content

Improvement/cldsrv 875 integrate shared prettier #4

Improvement/cldsrv 875 integrate shared prettier

Improvement/cldsrv 875 integrate shared prettier #4

Workflow file for this run

---
name: lint
on:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.sha }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: yarn
- name: install typescript
shell: bash
run: yarn global add typescript@4.9.5
- name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Fetch base for Prettier
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: git fetch --no-tags origin "$BASE_REF" --depth=50
- name: Prettier (changed files)
run: scripts/format-changed.sh
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: pip
- name: Install python deps
run: pip install flake8
- name: Lint Javascript
run: yarn run --silent lint -- --max-warnings 0
- name: Lint Markdown
run: yarn run --silent lint_md
- name: Lint python
run: flake8 $(git ls-files "*.py")
- name: Lint Yaml
run: yamllint -c yamllint.yml $(git ls-files "*.yml")