From 18137e1290b69332718ce310362eb600a2641335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 15 Aug 2025 13:57:43 +0200 Subject: [PATCH] ci: Add CI for Python projects (#18399) --- .github/workflows/ci-master.yml | 2 ++ .github/workflows/ci-pull-requests.yml | 2 ++ .github/workflows/ci-python.yml | 40 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .github/workflows/ci-python.yml diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 566b138de7..bee87a74d9 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -4,6 +4,8 @@ on: push: branches: - master + paths-ignore: + - packages/@n8n/task-runner-python/** jobs: unit-test: diff --git a/.github/workflows/ci-pull-requests.yml b/.github/workflows/ci-pull-requests.yml index f06be06bb6..6f0d499201 100644 --- a/.github/workflows/ci-pull-requests.yml +++ b/.github/workflows/ci-pull-requests.yml @@ -5,6 +5,8 @@ on: branches: - '**' - '!release/*' + paths-ignore: + - packages/@n8n/task-runner-python/** jobs: install-and-build: diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml new file mode 100644 index 0000000000..1e9d8c5d30 --- /dev/null +++ b/.github/workflows/ci-python.yml @@ -0,0 +1,40 @@ +name: Python CI + +on: + pull_request: + paths: + - packages/@n8n/task-runner-python/** + - .github/workflows/ci-python.yml + push: + paths: + - packages/@n8n/task-runner-python/** + +jobs: + python-ci: + runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/@n8n/task-runner-python + steps: + - name: Check out project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Install uv + uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # 6.5.0 + with: + enable-cache: true + + - name: Install Python + run: uv python install 3.13 + + - name: Install project dependencies + run: uv sync + + - name: Format check + run: uv run ruff format --check + + - name: Typecheck + run: uv run ty check src/ + + - name: Lint + run: uv run ruff check