From 3f97b47b403b10a9299ffb13e5f1373ffe03b1e0 Mon Sep 17 00:00:00 2001 From: Andrew Gardhouse Date: Mon, 20 Jan 2025 10:12:51 -0500 Subject: [PATCH] Skip formatting --- .github/workflows/format.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index ca56468..94bdbb4 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -14,20 +14,35 @@ jobs: black: runs-on: ubuntu-latest steps: + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + sf: + - pennylane_sf/** + - tests/** + - .pylintrc + - Makefile + - requirements-ci.txt + - requirements.txt + - setup.py - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.4.1 with: access_token: ${{ github.token }} - name: Set up Python + if: steps.filter.outputs.sf == 'true' uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies + if: steps.filter.outputs.sf == 'true' run: pip install black - uses: actions/checkout@v2 - name: Run Black + if: steps.filter.outputs.sf == 'true' run: black -l 100 pennylane_sf/ --check