Skip to content

Commit

Permalink
updated and added stestr
Browse files Browse the repository at this point in the history
  • Loading branch information
Procatv committed Aug 5, 2024
1 parent a68de4f commit 3a5bf50
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
CIBW_ENVIRONMENT: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_WINDOWS: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=c:\\Users\\runneradmin\\merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Runs tests
run: stestr run --abbreviate
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -66,6 +70,10 @@ jobs:
CIBW_ENVIRONMENT: >-
CARGO_BUILD_TARGET="aarch64-apple-darwin"
PYO3_CROSS_LIB_DIR="/Library/Frameworks/Python.framework/Versions/$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')/lib/python$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')"
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Runs tests
run: stestr run --abbreviate
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand All @@ -90,6 +98,10 @@ jobs:
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_SKIP: 'pp* cp36-* cp37-* *musllinux* *amd64 *x86_64'
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Runs tests
run: stestr run --abbreviate
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -137,6 +149,10 @@ jobs:
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Runs tests
run: stestr run --abbreviate
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-s390x
Expand Down Expand Up @@ -171,6 +187,10 @@ jobs:
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Runs tests
run: stestr run --abbreviate
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-ppc64le
Expand Down Expand Up @@ -234,4 +254,4 @@ jobs:
- name: Build sdist
run: python -m build . --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
skip = "pp* cp36-* cp37-* *musllinux* *win32 *i686 cp38-macosx_arm64"
test-skip = "*win32 *linux_i686"
test-command = "python {project}/examples/python/stochastic_swap.py"
test-command = "stestr run --abbreviate"
# We need to use pre-built versions of Numpy and Scipy in the tests; they have a
# tendency to crash if they're installed from source by `pip install`, and since
# Numpy 1.22 there are no i686 wheels, so we force pip to use older ones without
# restricting any dependencies that Numpy and Scipy might have.
before-test = "pip install --only-binary=numpy,scipy numpy scipy"
before-test = "pip install --only-binary=numpy,scipy numpy scipy -r {project}/requirements-dev.txt"
# Some jobs locally override the before-build and environment configuration if a
# specific job override is needed. For example tier 1 platforms locally override
# the before-build and environment configuration to enable PGO,
Expand Down Expand Up @@ -242,3 +242,7 @@ exclude_also = [
"if TYPE_CHECKING:", # Code that only runs during type checks
"@abstractmethod", # Abstract methods are not testable
]

[tool.stestr]
test_path="./test/python"
top_dir = "./"

0 comments on commit 3a5bf50

Please sign in to comment.