From 3b73e5cb267ea8ec0002898b2d8cc3f5a072b679 Mon Sep 17 00:00:00 2001 From: Corentin MUNOZ Date: Thu, 8 Jan 2026 18:32:35 +0100 Subject: [PATCH] ci: fix ci --- .github/workflows/test_and_release.yml | 60 +++++++++++--------------- pyproject.toml | 2 +- tests/test_import.py | 4 +- vue-components/.prettierrc.json | 2 +- 4 files changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test_and_release.yml b/.github/workflows/test_and_release.yml index cdaa53c..e810b54 100644 --- a/.github/workflows/test_and_release.yml +++ b/.github/workflows/test_and_release.yml @@ -2,9 +2,9 @@ name: Test and Release on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: pre-commit: @@ -16,7 +16,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 with: - version: "0.8.12" + version: "0.9.22" enable-cache: true - name: Install the project run: uv sync --all-extras --dev @@ -35,40 +35,31 @@ jobs: matrix: python-version: ["3.10"] config: - - { - name: "Linux", - os: ubuntu-latest - } - - { - name: "MacOSX", - os: macos-latest - } - - { - name: "Windows", - os: windows-latest - } + - { name: "Linux", os: ubuntu-latest } + - { name: "MacOSX", os: macos-latest } + - { name: "Windows", os: windows-latest } defaults: run: shell: bash steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - version: "0.8.12" - enable-cache: true - - name: Install and Run Tests - run: | - uv sync --dev - uv pip install -r tests/requirements.txt - uv run pytest -s ./tests + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + version: "0.9.22" + enable-cache: true + - name: Install and Run Tests + run: | + uv sync --dev + uv pip install -r tests/requirements.txt + uv run pytest -s ./tests test-npm-build: runs-on: ubuntu-latest @@ -89,12 +80,9 @@ jobs: npm run build release: - needs: [ - pre-commit, - pytest, - test-npm-build, - ] + needs: [pre-commit, pytest, test-npm-build] runs-on: ubuntu-latest + if: github.event_name == 'push' environment: release permissions: id-token: write # IMPORTANT: mandatory for trusted publishing diff --git a/pyproject.toml b/pyproject.toml index 6220c59..d6a8d2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,7 +108,7 @@ version_variables = [ "src/trame_flow/__init__.py:__version__", ] -build_command = "uv build" +build_command = "pip install uv && uv build" [tool.semantic_release.publish] dist_glob_patterns = ["dist/*"] diff --git a/tests/test_import.py b/tests/test_import.py index 486a27a..5f6c7e5 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -1,5 +1,3 @@ def test_import(): - # For components only, the CustomWidget is also importable via trame - from trame.widgets.trame_flow import NodeEditor - + from trame.widgets.flow import NodeEditor from trame_flow.widgets.flow import NodeEditor # noqa: F401,F811 diff --git a/vue-components/.prettierrc.json b/vue-components/.prettierrc.json index 9e26dfe..0967ef4 100644 --- a/vue-components/.prettierrc.json +++ b/vue-components/.prettierrc.json @@ -1 +1 @@ -{} \ No newline at end of file +{}