From 4846741e66ba0a96f033786bde68caa0f36536ec Mon Sep 17 00:00:00 2001 From: fmhoeger Date: Thu, 18 Jan 2024 21:21:09 -0600 Subject: [PATCH] Add pre-commit job to GitHub CI workflow --- .github/workflows/pyln-tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pyln-tests.yml b/.github/workflows/pyln-tests.yml index e50e7b2..404717b 100644 --- a/.github/workflows/pyln-tests.yml +++ b/.github/workflows/pyln-tests.yml @@ -12,6 +12,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.11 + check-latest: true - name: Install dependencies run: | python -m pip install --upgrade pip @@ -28,3 +29,17 @@ 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 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + check-latest: true + - name: Copy .pre-commit-config.yaml to project root + run: cp tests/.pre-commit-config.yaml . + - name: Run pre-commit hook + uses: pre-commit/action@v3.0.0