Skip to content

Commit

Permalink
Update CI/CD to run python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stand-by committed Aug 2, 2024
1 parent c64112b commit 08f8af5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/all_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --verbose --parallel
- name: Install
run: |
cmake --install ${{github.workspace}}/build
python -m pip install .[dev]
- name: Test C++
env:
OMP_NUM_THREADS: 2
Expand All @@ -40,6 +44,8 @@ jobs:
./${CPP_TEST_DIR}/test_pauli_op --test-case-exclude="*multistring*"
./${CPP_TEST_DIR}/test_pauli_string
./${CPP_TEST_DIR}/test_summed_pauli_op
- name: Test Python
run: make test-py

# - name: Test Python
# run: PYTHONPATH=build:$PYTHONPATH pytest -v test
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ build:
python -m pip install ".[dev]"
python -m build .

.PHONY: tests
tests:
test-cpp:
ctest --test-dir build
python -m pytest fast_pauli/py/tests
python -m pytest tests

test-py:
python -m pytest -v fast_pauli/py/tests
python -m pytest -v tests

.PHONY: test
test: test-cpp test-py

.PHONY: clean
clean:
Expand Down

0 comments on commit 08f8af5

Please sign in to comment.