From f14df0530c3c5544336d754bedce03045126466c Mon Sep 17 00:00:00 2001 From: fmhoeger Date: Sun, 7 Jan 2024 18:59:54 -0600 Subject: [PATCH] Add pre-commit hook to GitHub workflow Copy .pre-commit-config.yaml to project root --- .github/workflows/pyln-tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/pyln-tests.yml b/.github/workflows/pyln-tests.yml index e50e7b2..d8075cd 100644 --- a/.github/workflows/pyln-tests.yml +++ b/.github/workflows/pyln-tests.yml @@ -28,3 +28,14 @@ jobs: - name: Run pyln tests timeout-minutes: 5 run: cd tests && poetry run pytest -v + + pre-commit: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Copy .pre-commit-config.yaml to project root + run: cp tests/.pre-commit-config.yaml . + - uses: pre-commit/action@v3.0.0