Skip to content

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.

@mathiasertl
Copy link
Collaborator Author

Hi! Can we get this merged? Kr, Mat

@mathiasertl
Copy link
Collaborator Author

Same question again, @kislyuk?

Kr, Mat

@kislyuk
Copy link
Member

kislyuk commented Feb 11, 2025

LGTM, thanks. Merging. Just to clarify, the Dockerfile is not directly used in GHA, right?

@kislyuk kislyuk merged commit f330501 into master Feb 11, 2025
6 checks passed
@kislyuk kislyuk deleted the feature/run-testsuite-in-github-actions branch February 11, 2025 17:57
@mathiasertl
Copy link
Collaborator Author

Yes exactly. But it does allow you to easily run it on different distro versions locally!

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.

3 participants