diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 1a20783..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will install Python dependencies, run tests, and lint with a -# single version of Python. For more information see: -# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Lint - -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: Lint with black - uses: psf/black@stable - with: - options: "--check --diff --line-length 79" - src: "./spectrum_utils" - - name: Check for debugging print statements - run: | - if grep -rq "^\s*print(" spectrum_utils; then - echo "Found the following print statements:" - grep -r "^\s*print(" spectrum_utils - exit 1 - fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..da40b8f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Lint with black + uses: psf/black@stable + with: + options: "--check --diff --line-length 79" + + - name: Check for debugging print statements + run: | + if grep -rq "print(" spectrum_utils; then + echo "Found the following print statements:" + grep -r "print(" spectrum_utils + exit 1 + fi