Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the test suite with GitHub actions. #190

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mathiasertl
Copy link
Collaborator

@mathiasertl mathiasertl commented Dec 27, 2024

Run the test suite using GitHub actions.

Other minor improvements:

  • Use UV_PYTHON_PREFERENCE=only-system (as recommended in uv docs, brings a minor speedup).
  • Fix a test case (OpenSSL now requires -CAFile for verification).
  • Add Dockerfile to test running on different distributions.
  • Remove .travis.yml file (no longer needed).

Note that the Dockerfile can be used to indeed verify that OpenSSL 3.0.10 and oscrypto have a problem:

On Ubuntu 24.04:

$ docker build --build-arg IMAGE=ubuntu:24.04 -t test .
...
$ docker run --rm -it test 
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
$ docker run --rm -it test 
...
.venv/lib/python3.12/site-packages/oscrypto/_openssl/_libcrypto_cffi.py:44: LibraryNotFoundError
===================================================================================================================== short test summary info ======================================================================================================================
FAILED tests/test_public_key_external.py::ExternalPublicKeyTests::test_rsa - oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
FAILED tests/test_public_key_external.py::ExternalPublicKeyTests::test_terrible_hybrid_file_encryption_app - oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
== 2 failed, 82 passed, 5 skipped, 1 xfailed in 0.80s ==

While on Ubuntu 22.04:

# docker build --build-arg IMAGE=ubuntu:22.04 -t test .
...
$ docker run --rm -it test openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
$ docker run --rm -it test 
== 84 passed, 5 skipped, 1 xfailed in 0.80s ==

@mathiasertl mathiasertl requested review from danni and kislyuk December 27, 2024 15:41
@mathiasertl
Copy link
Collaborator Author

Independently of the contents, can we switch the default merge behavior to rebase and merge? History already has a lot of pointless merge commits. Obviously a matter of preference, but let me know what you think.

image

@kislyuk
Copy link
Member

kislyuk commented Dec 27, 2024

Thanks for the reminder - I have disabled the merge option, only squash and rebase merging are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants