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

Add SDK e2e tests #218

Merged
merged 32 commits into from
Aug 5, 2022
Merged

Conversation

deadlycoconuts
Copy link
Contributor

@deadlycoconuts deadlycoconuts commented Jul 20, 2022

Context

With the introduction of the Turing SDK, there has yet to be a set of e2e tests implemented to ensure that the SDK is always in sync with the development of the Turing API. This PR thus introduces a suite of e2e tests, based upon the API e2e tests, that utilise the SDK to interact with the API. Additional updates to the CI/CD workflows are also introduced to ensure that this suite completes successfully before allowing any merging/deployment from taking place.

Modifications

  • .github/actions/setup-test-cluster/action.yaml - Creation of a new reusable workflow from the chunk of steps found in .github/workflows/turing.yaml to create a test cluster; used when setting up a test cluster for the regular API e2e tests and the SDK e2e tests
  • .github/workflows/turing.yaml - Introduction of a test-e2e-sdk job to set up the test cluster and to run the test suite
  • sdk/Makefile - Minor redefinition of the makefile to ensure that there are 2 different makefile targets, 1 for running the SDK unit tests and the other for running the SDK e2e tests
  • sdk/e2e/* - Addition of the e2e test suite for the SDK; based upon the API e2e tests

@deadlycoconuts deadlycoconuts force-pushed the add_sdk_e2e_tests branch 15 times, most recently from 8e4d058 to 064675c Compare July 24, 2022 20:53
@deadlycoconuts deadlycoconuts force-pushed the add_sdk_e2e_tests branch 11 times, most recently from 9e4bd38 to c880789 Compare August 1, 2022 05:25
@@ -0,0 +1,219 @@
name: Set Up Test Cluster
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created this reusable workflow since we're using it (setting up a test cluster) for both the regular e2e tests as well as the SDK e2e tests.

@@ -395,7 +395,7 @@ def match_dependency(spec, name):
# conda dependencies whose spec differs slightly from Python's setuptools.
# We could install the complete conda library but this is too bulky if the goal is
# to just carry out this matching.
return spec == name or re.match(f'{name}[><=\s]+', spec) is not None
return spec == name or re.match(name + r"[><=\s]+", spec) is not None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited this to fix the deprecation warning about the use of \s as an escape sequence in f strings: https://github.com/gojek/turing/runs/7608305528?check_suite_focus=true#step:6:63

@deadlycoconuts deadlycoconuts changed the title Test e2e sdk pipeline Add SDK e2e tests Aug 2, 2022
@deadlycoconuts deadlycoconuts force-pushed the add_sdk_e2e_tests branch 3 times, most recently from 2acd78b to 1241509 Compare August 5, 2022 07:33
@deadlycoconuts deadlycoconuts force-pushed the add_sdk_e2e_tests branch 2 times, most recently from 575f1e9 to dfffd9b Compare August 5, 2022 08:09
@deadlycoconuts deadlycoconuts merged commit cf7408d into caraml-dev:main Aug 5, 2022
@deadlycoconuts
Copy link
Contributor Author

Thanks a lot for all the detailed comments! Just merged this! 🚀

@deadlycoconuts deadlycoconuts deleted the add_sdk_e2e_tests branch August 5, 2022 08:31
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