Skip to content

Commit 2cc6980

Browse files
authored
Make sure that test is run with Numpy in CI (#831)
1 parent 9380a69 commit 2cc6980

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/system.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
with:
5050
python-version: ${{ matrix.python-version }}
5151
architecture: ${{ matrix.architecture }}
52+
- run: python -m pip install --user numpy
5253
- name: Setup julia
5354
uses: julia-actions/setup-julia@v1
5455
with:

test/runtests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ PYTHONHOME=get(ENV,"PYTHONHOME","")
1010
PYTHONEXECUTABLE=get(ENV,"PYTHONEXECUTABLE","")
1111
@info "Python version $pyversion from $(PyCall.libpython), PYTHONHOME=$(PyCall.PYTHONHOME)\nENV[PYTHONPATH]=$PYTHONPATH\nENV[PYTHONHOME]=$PYTHONHOME\nENV[PYTHONEXECUTABLE]=$PYTHONEXECUTABLE"
1212

13+
@testset "CI setup" begin
14+
if lowercase(get(ENV, "CI", "false")) == "true"
15+
@test !ispynull(pyimport_e("numpy"))
16+
end
17+
end
18+
1319
roundtrip(T, x) = convert(T, PyObject(x))
1420
roundtrip(x) = roundtrip(PyAny, x)
1521
roundtripeq(T, x) = roundtrip(T, x) == x

0 commit comments

Comments
 (0)