Skip to content

Commit

Permalink
Install pytest-xdist tmp to fix the failure compat-stable-stable jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
maliasadi committed Apr 8, 2024
1 parent 4bca990 commit d8750f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ jobs:
- name: Run PennyLane-Lightning unit tests
run: |
# TODO: Remove installing pytest-xdist with release v0.36.0
python -m pip install pytest-xdist
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
OMP_NUM_THREADS=1 PL_DEVICE=${DEVICENAME} python -m pytest -n auto tests/ -k "not unitary_correct" $COVERAGE_FLAGS
Expand Down Expand Up @@ -391,6 +393,8 @@ jobs:
- name: Run PennyLane-Lightning unit tests
run: |
# TODO: Remove installing pytest-xdist with release v0.36.0
python -m pip install pytest-xdist
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
OMP_NUM_THREADS=1 PL_DEVICE=${DEVICENAME} python -m pytest -n auto tests/ -k "not unitary_correct" $COVERAGE_FLAGS
Expand Down Expand Up @@ -590,6 +594,8 @@ jobs:
- name: Run PennyLane-Lightning unit tests
if: ${{ matrix.pl_backend != 'all'}}
run: |
# TODO: Remove installing pytest-xdist with release v0.36.0
python -m pip install pytest-xdist
cd main/
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
PL_DEVICE=${DEVICENAME} python -m pytest tests/ $COVERAGE_FLAGS
Expand All @@ -610,6 +616,8 @@ jobs:
- name: Run PennyLane-Lightning unit tests for lightning.qubit with all devices installed
if: ${{ matrix.pl_backend == 'all' }}
run: |
# TODO: Remove installing pytest-xdist with release v0.36.0
python -m pip install pytest-xdist
cd main/
OMP_NUM_THREADS=1 PL_DEVICE=lightning.qubit python -m pytest -n auto tests/ -k "not unitary_correct" $COVERAGE_FLAGS
PL_DEVICE=lightning.qubit python -m pytest tests/ -k "unitary_correct" $COVERAGE_FLAGS --cov-append
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pennylane>=0.34
pybind11
pytest~=8.0.0
pytest-cov
pytest-mock
pytest-mock
pytest-xdist

0 comments on commit d8750f0

Please sign in to comment.