diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 54431cba..e40684c9 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -4,10 +4,14 @@ on: push: branches: - develop + paths: + - '**/*.py' pull_request: branches: - main - develop + paths: + - '**/*.py' jobs: test: diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 2d150671..11c87049 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -1,6 +1,17 @@ name: Ruff Checks (lint/format) -on: [push, pull_request] +on: + push: + branches: + - develop + paths: + - '**/*.py' + pull_request: + branches: + - main + - develop + paths: + - '**/*.py' jobs: lint: @@ -9,18 +20,18 @@ jobs: matrix: python-version: ["3.10"] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ruff - - name: Lint Check - run: | - ruff check . - - name: Format Check - run: | - ruff format --check . + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + - name: Lint Check + run: | + ruff check . + - name: Format Check + run: | + ruff format --check .