From cddf8f72c5a772b08a475e792766dd22fbb2ac8a Mon Sep 17 00:00:00 2001 From: sid <48153483+siddsriv@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:01:52 -0400 Subject: [PATCH] chore(ci): add pre-commit hooks to run in CI to duplicate validation (#5943) * chore(ci): add pre-commit hooks to run with CI too * chore: test commit to run CI checks --- .github/workflows/pre-commit-hooks.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pre-commit-hooks.yml diff --git a/.github/workflows/pre-commit-hooks.yml b/.github/workflows/pre-commit-hooks.yml new file mode 100644 index 0000000000000..a0c96f863f402 --- /dev/null +++ b/.github/workflows/pre-commit-hooks.yml @@ -0,0 +1,28 @@ +name: pre-commit hooks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + run-pre-commit-hooks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + cache: 'yarn' + + - name: install dependencies + run: yarn install --frozen-lockfile + + - name: run pre-commit hooks + run: | + yarn lint-staged + yarn lint:versions + yarn lint:dependencies \ No newline at end of file