Skip to content

Fix CI using epics containers #1233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
da690fa
add in motorsim tests
jennmald Feb 12, 2025
207b4e3
try to set up submodule and run docker containers
jennmald Feb 12, 2025
bf7fe61
try to fix paths
jennmald Feb 12, 2025
cdb4cdc
modify the paths one more time
jennmald Feb 12, 2025
e7885c3
debug paths
jennmald Feb 12, 2025
8110f38
debugging
jennmald Feb 12, 2025
f5c516e
debugging more paths
jennmald Feb 12, 2025
be09463
add submodules recursively
jennmald Feb 12, 2025
3a8979a
submodule edit?
jennmald Feb 12, 2025
8681b05
try podman
jennmald Feb 12, 2025
db2511a
start docker service
jennmald Feb 12, 2025
83eb84d
try docker compose instead of docker-compose
jennmald Feb 12, 2025
ede7bcc
read docker logs
jennmald Feb 12, 2025
3209484
typo
jennmald Feb 12, 2025
20b3135
wrong container name
jennmald Feb 12, 2025
3924f2b
add sleep
jennmald Feb 12, 2025
d087ddd
submodule commit
jennmald Feb 12, 2025
1357a26
CI: more sourcing
mrakitin Feb 12, 2025
edf72b7
Merge pull request #1 from mrakitin/ci-containers-source-vars
jennmald Feb 13, 2025
e626668
update area detector prefixes
jennmald Feb 13, 2025
b7f2a7f
forgot colon
jennmald Feb 13, 2025
7cd5136
update adsim prefix
jennmald Feb 13, 2025
aaa02ec
fix overlays
jennmald Feb 13, 2025
1635736
clean up epics services
jennmald Feb 13, 2025
de8bfb9
skip overlay tests, awaiting fix from DLS
jennmald Feb 19, 2025
a095b2a
clean up workflows:
jennmald Feb 19, 2025
d35c603
try to make directories
jennmald Feb 19, 2025
17a2c0e
ad directory printing
jennmald Feb 19, 2025
ba062fb
linter fixes with spacing
jennmald Feb 19, 2025
4a080a9
clean up workflows and add mounting for ophyd test data directory
jennmald Feb 19, 2025
cf5330d
add overlays and update docker containers
jennmald Mar 4, 2025
8d8053d
add transform
jennmald Mar 5, 2025
66c1d21
fix timeout for netCDF1:
jennmald Mar 5, 2025
ab9ab8f
remove submodule dependency
jennmald Mar 13, 2025
69a3d77
add the paths to checkout bluesky/epics-services-for-ophyd
jennmald Mar 13, 2025
6db1124
remove path
jennmald Mar 14, 2025
66f3769
need paths
jennmald Mar 14, 2025
8a0ee28
remove netcdf to see where timeout occurs
jennmald Mar 14, 2025
4fac484
readd netCDF support
jennmald Mar 24, 2025
b2ba234
remove submodule reference
jennmald Mar 25, 2025
cd4dc53
final changes with absolute path and printing logs
jennmald Mar 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
env:
TEST_CL: pyepics

defaults:
run:
shell: bash -leo pipefail {0}

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -66,19 +70,47 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install --upgrade setuptools && pip install -e .[dev] && pipdeptree
run: |
pip install --upgrade setuptools && pip install -e .[dev] && pipdeptree

- name: Install prereleases of certain dependencies.
run: pip install --upgrade --pre bluesky event-model
run: |
pip install --upgrade --pre bluesky event-model
if: ${{ matrix.prerelease }}

- name: Start IOCs in containers.
- name: Start Docker
run: |
sudo systemctl start docker
docker version
docker compose --version

- name: Create AD data directories
run: |
mkdir -p /tmp/ophyd_AD_test/
python scripts/create_directories.py /tmp/ophyd_AD_test/data1

- name: Clone epics-services-for-ophyd
run: |
source ${GITHUB_WORKSPACE}/scripts/epics_exports.sh
source ${GITHUB_WORKSPACE}/scripts/epics_docker.sh
git clone https://github.com/bluesky/epics-services-for-ophyd.git ~/epics-services-for-ophyd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's consider using this as an action in the future.


- name: Start docker containers
run: |
source ~/epics-services-for-ophyd/environment.sh
docker compose -f ~/epics-services-for-ophyd/compose.yaml up -d

- name: Wait for docker containers to start
run: |
sleep 20

- name: Test with pytest
run: pytest -k "${TEST_CL}" -m "not motorsim" --strict-markers
run: |
source ~/epics-services-for-ophyd/environment.sh
pytest -k "${TEST_CL}"

- name: Print Docker Compose Logs
if: always()
run: |
docker compose -f ~/epics-services-for-ophyd/compose.yaml logs

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion ophyd/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def motor(request, cleanup):
def ad_prefix():
"AreaDetector prefix"
# prefixes = ['13SIM1:', 'XF:31IDA-BI{Cam:Tbl}']
prefixes = ["ADSIM:"]
prefixes = ["ADSIM:", "XF:31IDA-BI{Cam:Tbl}:"]

for prefix in prefixes:
test_pv = prefix + "TIFF1:PluginType_RBV"
Expand Down