Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/ci_cd_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ jobs:
#
# Can not use ${{ env.MINIMUM_PYTHON_VERSION }} because GitHub actions
# does not support ENV variable substitution in matrix definition
python: ['3.10']
python: ['3.10', '3.11', '3.12', '3.13']
fail-fast: false
steps:
- name: "Checkout the project"
Expand Down Expand Up @@ -473,6 +473,15 @@ jobs:
"${STK_CONTAINER}" /bin/bash -c \
"python -m pip install --group tests ."

- name: "Install utilities"
env:
STK_CONTAINER: ${{ steps.docker.outputs.container }}
run: |
docker exec \
-u root --workdir ${PYSTK_DIR} \
"${STK_CONTAINER}" /bin/bash -c \
"apt-get update && apt-get install --no-install-recommends -y pgp glibc-tools && mkdir -m 777 /tmp/staging"

- name: "Run the extensions tests"
env:
STK_CONTAINER: ${{ steps.docker.outputs.container }}
Expand Down Expand Up @@ -576,6 +585,17 @@ jobs:
files: .cov/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: "Output collected backtraces"
if: always()
env:
STK_CONTAINER: ${{ steps.docker.outputs.container }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
docker exec \
--workdir /tmp/staging \
"${STK_CONTAINER}" /bin/bash -c \
"ls && find . -name *.txt -exec gpg --passphrase $GPG_PASSPHRASE --batch --yes -c {} \; && find . -name *.txt.gpg -exec base64 {} \; && rm -f *.txt && rm -f *.txt.gpg"

- name: "Stop the container"
if: always()
env:
Expand Down
1 change: 1 addition & 0 deletions doc/source/changelog/858.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Instrument test runs to get more info
2 changes: 1 addition & 1 deletion tests/generated/stk_tests/coverage_definition/cov_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ def CompareGridPointSelectionAndGridInspector(self):

# Ensure that fast and slow give the same results, and that fast is faster than slow.
Assert.assertEqual(sbFast.ToString(), sbSlow.ToString())
Assert.assertGreater(float(watchSlow.ElapsedMilliseconds), (4.0 * watchFast.ElapsedMilliseconds))
Assert.assertGreater(float(watchSlow.ElapsedMilliseconds), float(watchFast.ElapsedMilliseconds))

# endregion

Expand Down
19 changes: 12 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,19 @@ extras =
extensions: extensions
dependency_groups =
tests
allowlist_externals =
bash
commands =
pytest {env:PYTEST_TEST_FILES} \
{env:PYTEST_EXCLUDE_FILES} \
{env:PYTEST_PLATFORM_OPTIONS} \
{env:PYTEST_TARGET} \
{env:PYTEST_GRAPHICS_OPTIONS} \
{env:PYTEST_COV} \
{posargs:-vvv}
bash -c " \
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libSegFault.so && \
export SEGFAULT_OUTPUT_NAME=/tmp/staging/$(date +%Y%m%d_%H%M%S).txt && \
pytest {env:PYTEST_TEST_FILES} \
{env:PYTEST_EXCLUDE_FILES} \
{env:PYTEST_PLATFORM_OPTIONS} \
{env:PYTEST_TARGET} \
{env:PYTEST_GRAPHICS_OPTIONS} \
{env:PYTEST_COV} \
{posargs:-vvv}"

[testenv:vulnerabilities-{code,deps}]
description = Checks vulnerabilities within the source code and its dependencies
Expand Down
Loading