Skip to content

Commit

Permalink
Add dependency tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thisac committed Jul 5, 2024
1 parent 4e4e3a2 commit 5c08aba
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
44 changes: 43 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,60 @@ jobs:
pip install -r requirements_dev.txt
pytest tests/
test-dependencies:
parameters:
python-version:
type: string
dependency-versions:
type: string

docker:
- image: python:<< parameters.python-version >>-slim

steps:
- checkout
- attach_workspace:
at: dist
- run:
name: install
command: |
python -m venv env
. env/bin/activate
pip install "<< parameters.dependency-versions >>" --upgrade --only-binary=numpy
pip install dwave-gate --no-index -f dist/ --no-deps --force-reinstall
- run: &unix-run-tests
name: run tests
command: |
. env/bin/activate
pip install -r requirements_dev.txt
pytest tests/
workflows:
tests:
jobs:
- build-linux: &build
matrix:
parameters:
python-version: &python-versions [3.8.9, 3.9.4, 3.10.0, 3.11.0, 3.12.0]
python-version: &python-versions [3.8.19, 3.9.19, 3.10.14, 3.11.9, 3.12.4]
- build-linux-aarch64: *build
- build-sdist
- build-osx: *build
- build-windows: *build
- test-codecov
- test-dependencies:
name: test-dependencies - << matrix.dependency-versions >> - py << matrix.python-version >>
requires:
- build-linux
matrix:
parameters:
# test the lowest and highest for each dependency
dependency-versions: [
numpy==1.24.4,
numpy
]
python-version: *python-versions
exclude:
- dependency-versions: numpy==1.24.4
python-version: 3.12.4
- test-sdist:
requires:
- build-sdist
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = [
"wheel>=0.30.0", # limited python api support
"cython~=3.0",
"numpy==1.24.4; python_version=='3.8'",
"numpy>=2.0.0rc1; python_version>='3.9'",
"numpy>=2.0.0; python_version>='3.9'",
]
build-backend = "setuptools.build_meta"

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy==1.22.4
numpy==1.24.4
cython==3.0.4
cgen==2020.1
pyqir==0.8.2
pyqir==0.8.2

0 comments on commit 5c08aba

Please sign in to comment.