Skip to content

Commit 25fe830

Browse files
authored
Merge pull request #1221 from tacaswell/ci/skip_busted_docker
CI: do not try to start docker images that no longer exist
2 parents 69d7650 + 9cce944 commit 25fe830

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

.github/workflows/code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
source ${GITHUB_WORKSPACE}/scripts/epics_docker.sh
7979
8080
- name: Test with pytest
81-
run: pytest -k "${TEST_CL}"
81+
run: pytest -k "${TEST_CL}" -m "not motorsim" --strict-markers
8282

8383
- name: Upload coverage to Codecov
8484
uses: codecov/codecov-action@v2

docs/user/reference/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Added
99
-----
1010

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

ophyd/tests/test_issue944.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1111
echo "pytest_plugins = 'pytester'" >> conftest.py
1212
"""
13+
import pytest
1314

1415
from .config import motor_recs
1516

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

2425

26+
@pytest.mark.motorsim
2527
def test_local_without_defaults_no_string(testdir):
2628
from ophyd import EpicsSignal
2729

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

3436

37+
@pytest.mark.motorsim
3538
def test_without_defaults_no_string(testdir):
3639
run_test_code(
3740
testdir,
@@ -51,6 +54,7 @@ def test_without_defaults_no_string():
5154
)
5255

5356

57+
@pytest.mark.motorsim
5458
def test_without_defaults_as_string(testdir):
5559
run_test_code(
5660
testdir,
@@ -70,6 +74,7 @@ def test_without_defaults_no_string():
7074
)
7175

7276

77+
@pytest.mark.motorsim
7378
def test_with_all_defaults_no_string(testdir):
7479
run_test_code(
7580
testdir,
@@ -96,6 +101,7 @@ def test_without_defaults_no_string():
96101
)
97102

98103

104+
@pytest.mark.motorsim
99105
def test_with_all_defaults_as_string(testdir):
100106
run_test_code(
101107
testdir,
@@ -123,6 +129,7 @@ def test_without_defaults_no_string():
123129
)
124130

125131

132+
@pytest.mark.motorsim
126133
def test_with_all_defaults_auto_monitor(testdir):
127134
run_test_code(
128135
testdir,
@@ -147,6 +154,7 @@ def test_without_defaults_no_string():
147154
)
148155

149156

157+
@pytest.mark.motorsim
150158
def test_with_all_defaults_connection_timeout(testdir):
151159
run_test_code(
152160
testdir,
@@ -171,6 +179,7 @@ def test_without_defaults_no_string():
171179
)
172180

173181

182+
@pytest.mark.motorsim
174183
def test_with_all_defaults_timeout(testdir):
175184
run_test_code(
176185
testdir,
@@ -195,6 +204,7 @@ def test_without_defaults_no_string():
195204
)
196205

197206

207+
@pytest.mark.motorsim
198208
def test_with_all_defaults_write_timeout(testdir):
199209
run_test_code(
200210
testdir,

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ markers = [
2020
asyncio_mode = "auto"
2121
# https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings
2222
# filterwarnings = "error"
23+
python_files = "test_*.py"

pytest.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/epics_docker.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@ sudo cp $SCRIPTS_DIR/docker.conf $file
1111
sudo systemctl daemon-reload
1212
sudo systemctl restart docker
1313

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

18-
docker pull ${MOTOR_DOCKERIMAGE}
19-
docker pull ${PE_DOCKERIMAGE}
2016
docker pull ${AD_DOCKERIMAGE}
2117

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

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

0 commit comments

Comments
 (0)