From 6eb40e1b10cb4f125bfe0efc651c6f07faa18409 Mon Sep 17 00:00:00 2001 From: David Perl Date: Wed, 25 Nov 2026 15:46:55 +0100 Subject: [PATCH] feat: fix ci dependency install --- .gitea/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c6fdcef..21fc3ea 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -24,6 +24,11 @@ on: required: false type: string default: "main" + MX_BEC_REPO_BRANCH: + description: "Branch of the mx_bec core repo to install" + required: false + type: string + default: "main" PYTHON_VERSION: description: "Python version to use" required: false @@ -46,6 +51,29 @@ jobs: with: python-version: "${{ inputs.PYTHON_VERSION || '3.12' }}" + # Use the same-named branch of mx_bec if it exists (e.g. a feature developed in both repos), otherwise main. + - name: Resolve mx_bec branch + id: mx_bec + shell: bash + run: | + ref="${{ inputs.MX_BEC_REPO_BRANCH || github.head_ref || github.ref_name }}" + auth="$(printf 'x-access-token:%s' '${{ github.token }}' | base64 -w0)" + if git -c "http.extraheader=Authorization: Basic ${auth}" ls-remote --exit-code --heads \ + "${{ github.server_url }}/bec/mx_bec.git" "refs/heads/${ref}" >/dev/null; then + echo "Using mx_bec branch '${ref}'" + else + echo "mx_bec has no branch '${ref}', using main" + ref=main + fi + echo "ref=${ref}" >> "$GITHUB_OUTPUT" + + - name: Checkout MX BEC Repository + uses: actions/checkout@v4 + with: + repository: bec/mx_bec + ref: "${{ steps.mx_bec.outputs.ref }}" + path: ./mx_bec + - name: Checkout BEC Plugin Repository uses: actions/checkout@v4 with: @@ -94,8 +122,11 @@ jobs: uv pip install --system -e ./bec/bec_lib[dev] uv pip install --system -e ./bec/bec_ipython_client uv pip install --system -e ./bec/bec_server[dev] - uv pip install --system -e ./bec_widgets[dev,pyside6] - uv pip install --system -e ./pxiii_bec[dev] + uv pip install --system -e ./bec_widgets[dev] + # mx_bec pins its MX-internal dependencies (aarecommon, aare_config, ...) as direct URLs + # to the gitea registry. uv only accepts URL dependencies from packages named on the + # command line, so mx_bec must be installed together with the plugin which depends on it. + uv pip install --system -e ./mx_bec[dev] -e ./pxiii_bec[dev] - name: Run Tests with Coverage id: coverage