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 ability to launch all integration/standard tests from slash commands #1169

Merged
merged 24 commits into from
Dec 3, 2020

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Dec 2, 2020

Allows any connector to be tested from PRs with /test connector=source-shopify-singer (or /test connector=source-shopify-singer ref=COMMIT if you want to override the branch/commit).

These won't start working until after this is pushed, because workflow dispatch commands need the setup for the slash command to exist on master - it's basically a limitation of Github Actions.

We can see an example of it running in this branch until the commit to remove jrhizor/add-other-builds.

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer ref=jrhizor/add-other-builds

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

1 similar comment
@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

2 similar comments
@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 2, 2020

/source-exchangeratesapi-singer

@jrhizor jrhizor changed the title add other separated builds add ability to launch all integration/standard tests from slash commands Dec 3, 2020
@jrhizor jrhizor requested a review from cgardens December 3, 2020 18:57
@jrhizor jrhizor marked this pull request as ready for review December 3, 2020 19:23
@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 3, 2020

This is ready for review. I'll probably have to make some more dependency fixes to get the all case working, but the main framework is here.

all_standard_python_tests=$(./gradlew standardSourceTestPython --dry-run | grep 'standardSourceTestPython SKIPPED' | cut -d: -f 4)

if [[ "$connector" == "all" ]] ; then
echo "Running: ./gradlew --no-daemon --scan integrationTest standardSourceTestPython"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo "Running: ./gradlew --no-daemon --scan integrationTest standardSourceTestPython"
cmd="./gradlew --no-daemon --scan integrationTest standardSourceTestPython"
echo "Running: $cmd"
$cmd

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just $cmd doesn't work, and we'd need to add evals.

# jrhizor in ~/code/airbyte on git:jrhizor/add-other-builds ● [15:01:23]
→ cmd="echo hi"

# jrhizor in ~/code/airbyte on git:jrhizor/add-other-builds ● [15:03:10]
→ $cmd
zsh: command not found: echo hi

Since this is temporary anyways, going to just merge as is and improve later.


if [[ "$connector" == "all" ]] ; then
echo "Running: ./gradlew --no-daemon --scan integrationTest standardSourceTestPython"
./gradlew --no-daemon --scan integrationTest standardSourceTestPython
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
./gradlew --no-daemon --scan integrationTest standardSourceTestPython

echo "Running: ./gradlew --no-daemon --scan integrationTest standardSourceTestPython"
./gradlew --no-daemon --scan integrationTest standardSourceTestPython
else
selected_integration_test=$(echo "$all_integration_tests" | grep "^$connector$" || echo "")
Copy link
Contributor

Choose a reason for hiding this comment

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

not blocking for this PR, but should this selection logic live in a gradle task where we just say "integrationTest" and it figures out whether it's standard python or anything else? That way it can be re-used by any other tools, and is more accessible for anyone new to the repo since it's all wrapped in a gradle task

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. It feels like integrationTest is the right umbrella task, but we'd need to switch that to javaIntegrationTest or something first to put both under it.

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