Compare commits
2 Commits
main
...
build/ci_u
| Author | SHA1 | Date | |
|---|---|---|---|
| 675cc26571 | |||
| 670748f46d |
@@ -2,7 +2,7 @@
|
||||
# It is needed to track the repo template version, and editing may break things.
|
||||
# This file will be overwritten by copier on template updates.
|
||||
|
||||
_commit: v1.2.8
|
||||
_commit: v1.2.2
|
||||
_src_path: https://github.com/bec-project/plugin_copier_template
|
||||
make_commit: false
|
||||
project_name: iss_bec
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: CI for iss_bec
|
||||
name: CI for ISS_bec
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
@@ -28,7 +28,7 @@ on:
|
||||
description: "Python version to use"
|
||||
required: false
|
||||
type: string
|
||||
default: "3.12"
|
||||
default: "3.11"
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
@@ -39,64 +39,36 @@ jobs:
|
||||
env:
|
||||
QTWEBENGINE_DISABLE_SANDBOX: 1
|
||||
QT_QPA_PLATFORM: "offscreen"
|
||||
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.PYTHON_VERSION || '3.12' }}"
|
||||
|
||||
- name: Checkout BEC Plugin Repository
|
||||
- name: Checkout shared action repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: bec/iss_bec
|
||||
ref: "${{ inputs.BEC_PLUGIN_REPO_BRANCH || github.head_ref || github.sha }}"
|
||||
path: ./iss_bec
|
||||
repository: bec/bec_shared_actions
|
||||
ref: main
|
||||
path: bec_shared_actions
|
||||
|
||||
- name: Lint for merge conflicts from template updates
|
||||
shell: bash
|
||||
# Find all Copier conflicts except this line
|
||||
run: '! grep -r "<<<<<<< before updating" | grep -v "grep -r \"<<<<<<< before updating"'
|
||||
|
||||
- name: Checkout BEC Core
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout Plugin and BEC Repositories
|
||||
uses: bec/bec_shared_actions/checkout_repositories@main
|
||||
# uses: ./bec_shared_actions
|
||||
with:
|
||||
repository: bec/bec
|
||||
ref: "${{ inputs.BEC_CORE_BRANCH || 'main' }}"
|
||||
path: ./bec
|
||||
|
||||
- name: Checkout Ophyd Devices
|
||||
uses: actions/checkout@v4
|
||||
BEC_WIDGETS_BRANCH: "${{ github.event.inputs.BEC_WIDGETS_BRANCH || 'main' }}"
|
||||
BEC_CORE_BRANCH: "${{ github.event.inputs.BEC_CORE_BRANCH || 'main' }}"
|
||||
OPHYD_DEVICES_BRANCH: "${{ github.event.inputs.OPHYD_DEVICES_BRANCH || 'main' }}"
|
||||
BEC_PLUGIN_REPO_BRANCH: "${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.BEC_PLUGIN_REPO_BRANCH || 'main') || github.head_ref || github.ref_name }}"
|
||||
PLUGIN_REPO_NAME: "${{ github.event.repository.name }}"
|
||||
|
||||
- name: Install external APT packages
|
||||
uses: bec/bec_shared_actions/install_apt_packages@main
|
||||
with:
|
||||
repository: bec/ophyd_devices
|
||||
ref: "${{ inputs.OPHYD_DEVICES_BRANCH || 'main' }}"
|
||||
path: ./ophyd_devices
|
||||
|
||||
- name: Checkout BEC Widgets
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: bec/bec_widgets
|
||||
ref: "${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}"
|
||||
path: ./bec_widgets
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb
|
||||
sudo apt-get -y install libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1
|
||||
APT_PACKAGES: "libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1"
|
||||
|
||||
- name: Install Python dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install uv
|
||||
uv pip install --system -e ./ophyd_devices
|
||||
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 ./iss_bec
|
||||
uses: bec/bec_shared_actions/install_python_env@main
|
||||
with:
|
||||
PYTHON_VERSION: "${{ github.event.inputs.PYTHON_VERSION || '3.11' }}"
|
||||
PLUGIN_REPO_NAME: "${{ github.event.repository.name }}"
|
||||
|
||||
- name: Run Pytest with Coverage
|
||||
id: coverage
|
||||
run: pytest --random-order --cov=./iss_bec --cov-config=./iss_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./iss_bec/tests/ || test $? -eq 5
|
||||
- name: Run pytest for Plugin
|
||||
uses: bec/bec_shared_actions/run_pytest_for_plugin@main
|
||||
with:
|
||||
PLUGIN_REPO_NAME: "${{ github.event.repository.name }}"
|
||||
7
.gitlab-ci.yml
Normal file
7
.gitlab-ci.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
include:
|
||||
- file: /templates/plugin-repo-template.yml
|
||||
inputs:
|
||||
name: iss_bec
|
||||
target: iss_bec
|
||||
branch: $CHILD_PIPELINE_BRANCH
|
||||
project: bec/awi_utils
|
||||
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
||||
name = "iss_bec"
|
||||
version = "0.0.0"
|
||||
description = "A plugin repository for BEC"
|
||||
requires-python = ">=3.11"
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Programming Language :: Python :: 3",
|
||||
|
||||
Reference in New Issue
Block a user