74 lines
2.5 KiB
YAML
74 lines
2.5 KiB
YAML
name: CI for Debye_bec
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
inputs:
|
|
BEC_WIDGETS_BRANCH:
|
|
description: "Branch of BEC Widgets to install"
|
|
required: false
|
|
type: string
|
|
default: "main"
|
|
BEC_CORE_BRANCH:
|
|
description: "Branch of BEC Core to install"
|
|
required: false
|
|
type: string
|
|
default: "main"
|
|
OPHYD_DEVICES_BRANCH:
|
|
description: "Branch of Ophyd Devices to install"
|
|
required: false
|
|
type: string
|
|
default: "main"
|
|
BEC_PLUGIN_REPO_BRANCH:
|
|
description: "Branch of the BEC Plugin Repository to install"
|
|
required: false
|
|
type: string
|
|
default: "main"
|
|
PYTHON_VERSION:
|
|
description: "Python version to use"
|
|
required: false
|
|
type: string
|
|
default: "3.11"
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
QTWEBENGINE_DISABLE_SANDBOX: 1
|
|
QT_QPA_PLATFORM: "offscreen"
|
|
steps:
|
|
- name: Checkout shared action repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: bec/bec_shared_actions
|
|
ref: main
|
|
path: bec_shared_actions
|
|
|
|
- name: Checkout Plugin and BEC Repositories
|
|
uses: bec/bec_shared_actions/checkout_repositories@main
|
|
# uses: ./bec_shared_actions
|
|
with:
|
|
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:
|
|
APT_PACKAGES: "libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1"
|
|
|
|
- name: Install Python dependencies
|
|
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 for Plugin
|
|
uses: bec/bec_shared_actions/run_pytest_for_plugin@main
|
|
with:
|
|
PLUGIN_REPO_NAME: "${{ github.event.repository.name }}" |