From bbf62402ef3923d914b8e6cdea3cb817d2974797 Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 16:43:17 +0100 Subject: [PATCH] Restrict CI push triggers to main and dev branches --- .github/workflows/ci.yml | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d940b49..67e869d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,35 +1,36 @@ name: CI on: - push: - pull_request: + push: + branches: [main, dev] + pull_request: jobs: - checks: - runs-on: ubuntu-latest + checks: + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - uses: actions/setup-python@v6 - with: - python-version: "3.13" - cache: "pip" + - uses: actions/setup-python@v6 + with: + python-version: "3.13" + cache: "pip" - - name: Install package and dev tools - run: | - python -m pip install --upgrade pip - pip install -e . - pip install pytest ruff mypy + - name: Install package and dev tools + run: | + python -m pip install --upgrade pip + pip install -e . + pip install pytest ruff mypy - - name: Lint - run: ruff check . + - name: Lint + run: ruff check . - - name: Format check - run: ruff format --check . + - name: Format check + run: ruff format --check . - - name: Type check - run: mypy src + - name: Type check + run: mypy src - - name: Test - run: pytest + - name: Test + run: pytest