Skip to content

[release-23.0] VReplication: only build a bulk-delete plan for insert… #6310

[release-23.0] VReplication: only build a bulk-delete plan for insert…

[release-23.0] VReplication: only build a bulk-delete plan for insert… #6310

name: vtadmin-web linting + formatting
# In specifying the 'paths' property, we need to include the path to this workflow .yml file.
# See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4)
on:
push:
branches:
- "main"
- "release-[0-9]+.[0-9]"
tags: '**'
paths:
- '.github/workflows/vtadmin_web_lint.yml'
- 'web/vtadmin/**'
pull_request:
branches: '**'
paths:
- '.github/workflows/vtadmin_web_lint.yml'
- 'web/vtadmin/**'
permissions: read-all
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- name: Tune the OS
uses: ./.github/actions/tune-os
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
# node-version should match package.json
node-version: '22.13.1'
- name: Install dependencies
run: cd ./web/vtadmin && npm ci
# Using "if: always()" means each step will run, even if a previous
# step fails. This is nice because, for example, we want stylelint and
# prettier to run even if eslint fails.
#
# An undesirable secondary effect of this is these steps
# will run even if the install, etc. steps fail, which is... weird.
# A nice enhancement is to parallelize these steps into jobs, with the
# trade-off of more complexity around sharing npm install artifacts.
- name: Run eslint
if: always()
run: cd ./web/vtadmin && npm run lint:eslint
- name: Run stylelint
if: always()
run: cd ./web/vtadmin && npm run lint:stylelint -- -f verbose
- name: Run prettier
if: always()
run: cd ./web/vtadmin && npm run lint:prettier
# Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true