From ee623c0fa9de3750090745ea227d3be94c4d8e4c Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Tue, 19 Jan 2021 20:10:00 -0800 Subject: [PATCH] Get testdata using checkout action --- .github/workflows/main.yml | 8 +++++++- pyqtgraph/tests/image_testing.py | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f904aca9..2870ae31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,13 @@ jobs: qt-version: "" numpy-version: "" steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Checkout test-data + uses: actions/checkout@v2 + with: + repository: pyqtgraph/test-data + path: .pyqtgraph/test-data - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: diff --git a/pyqtgraph/tests/image_testing.py b/pyqtgraph/tests/image_testing.py index 12101b2c..42b5725f 100644 --- a/pyqtgraph/tests/image_testing.py +++ b/pyqtgraph/tests/image_testing.py @@ -469,7 +469,10 @@ def getTestDataRepo(): """ global testDataTag - dataPath = os.path.join(os.path.expanduser('~'), '.pyqtgraph', 'test-data') + if os.environ["CI"]: + dataPath = os.path.join(os.environ["GITHUB_WORKSPACE"], '.pyqtgraph', 'test-data') + else: + dataPath = os.path.join(os.path.expanduser('~'), '.pyqtgraph', 'test-data') gitPath = 'https://github.com/pyqtgraph/test-data' gitbase = gitCmdBase(dataPath)