feat: fix ci dependency install
This commit was merged in pull request #11.
This commit is contained in:
1 parent
ce42db08ce
commit
35b8a881db
1 file changed
+34
-2
+34
-2
@@ -1,6 +1,7 @@
|
||||
name: CI for pxi_bec
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -24,6 +25,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 +52,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 +123,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 ./pxi_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 ./pxi_bec[dev]
|
||||
|
||||
- name: Run Tests with Coverage
|
||||
id: coverage
|
||||
|
||||
Reference in new issue
Block a user