Skip to content

Commit

Permalink
Merge pull request #1221 from tacaswell/ci/skip_busted_docker
Browse files Browse the repository at this point in the history
CI: do not try to start docker images that no longer exist
  • Loading branch information
jwlodek authored Nov 21, 2024
2 parents 69d7650 + 9cce944 commit 25fe830
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
source ${GITHUB_WORKSPACE}/scripts/epics_docker.sh
- name: Test with pytest
run: pytest -k "${TEST_CL}"
run: pytest -k "${TEST_CL}" -m "not motorsim" --strict-markers

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion docs/user/reference/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Added
-----

* ``count`` parameter to Signal.get (same as pv.get)
* ``.locate()` method to EpicsMotor, returning setpoint and readback
* ``.locate()`` method to EpicsMotor, returning setpoint and readback
* ``dtype`` and ``shape`` keywords can be specified in Signal constructor to avoid type inference
* ``describe()`` returns ``dtype_numpy``, if available

Expand Down
10 changes: 10 additions & 0 deletions ophyd/tests/test_issue944.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
echo "pytest_plugins = 'pytester'" >> conftest.py
"""
import pytest

from .config import motor_recs

Expand All @@ -22,6 +23,7 @@ def run_test_code(testdir, code):
result.stdout.fnmatch_lines(["* 1 passed*"])


@pytest.mark.motorsim
def test_local_without_defaults_no_string(testdir):
from ophyd import EpicsSignal

Expand All @@ -32,6 +34,7 @@ def test_local_without_defaults_no_string(testdir):
assert desc["signal"]["dtype"] == "integer"


@pytest.mark.motorsim
def test_without_defaults_no_string(testdir):
run_test_code(
testdir,
Expand All @@ -51,6 +54,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_without_defaults_as_string(testdir):
run_test_code(
testdir,
Expand All @@ -70,6 +74,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_no_string(testdir):
run_test_code(
testdir,
Expand All @@ -96,6 +101,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_as_string(testdir):
run_test_code(
testdir,
Expand Down Expand Up @@ -123,6 +129,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_auto_monitor(testdir):
run_test_code(
testdir,
Expand All @@ -147,6 +154,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_connection_timeout(testdir):
run_test_code(
testdir,
Expand All @@ -171,6 +179,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_timeout(testdir):
run_test_code(
testdir,
Expand All @@ -195,6 +204,7 @@ def test_without_defaults_no_string():
)


@pytest.mark.motorsim
def test_with_all_defaults_write_timeout(testdir):
run_test_code(
testdir,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ markers = [
asyncio_mode = "auto"
# https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings
# filterwarnings = "error"
python_files = "test_*.py"
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/epics_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ sudo cp $SCRIPTS_DIR/docker.conf $file
sudo systemctl daemon-reload
sudo systemctl restart docker

MOTOR_DOCKERIMAGE="nsls2/epics-docker:latest"
PE_DOCKERIMAGE="nsls2/pyepics-docker:latest"
AD_DOCKERIMAGE="prjemian/synapps-6.1-ad-3.7:latest"

docker pull ${MOTOR_DOCKERIMAGE}
docker pull ${PE_DOCKERIMAGE}
docker pull ${AD_DOCKERIMAGE}

mkdir -p /tmp/ophyd_AD_test/
Expand All @@ -26,9 +22,6 @@ mkdir -p /tmp/ophyd_AD_test/
# does not create missing directories.
python $SCRIPTS_DIR/create_directories.py /tmp/ophyd_AD_test/data1

docker run --rm -d -v /tmp/ophyd_AD_test:/tmp/ophyd_AD_test/ ${MOTOR_DOCKERIMAGE}
docker run --name=area-detector --rm -dit -v /tmp/ophyd_AD_test:/tmp/ophyd_AD_test/ -e AD_PREFIX="ADSIM:" ${AD_DOCKERIMAGE} /bin/bash
sleep 1 # Probably not needed?
docker exec area-detector iocSimDetector/simDetector.sh start
docker run --rm -d ${PE_DOCKERIMAGE}

0 comments on commit 25fe830

Please sign in to comment.