-
Notifications
You must be signed in to change notification settings - Fork 40
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
Adds multi-language support to integration test workflow #79
Conversation
- Added step to detect language from sample app directory prefix - Added conditions for TypeScript-specific steps - Added integ test step for python
Adds py-microservices sample app - Added py-microservices sample app - Added integration tests for py-microservices
20d3315
to
ced3869
Compare
@@ -69,7 +69,13 @@ jobs: | |||
set -x | |||
dirs_with_tests="$( | |||
for d in $(find * -type d -maxdepth 0 || printf ''); do | |||
jq &>/dev/null -e '.scripts."integ-test"' $d/package.json && echo "$d" | |||
TESTABLE_APP=$(jq &>/dev/null -e '.scripts."integ-test"' $d/package.json && echo "$d") | |||
if [[ ! -z $(grep "^integ-test:" "${d}/Makefile" 2> /dev/null) ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super minor, but in case you're interested:
! -z
is aka-n
- you can just do
if grep -q ... ; then
(with no[[ ... ]]]
). In that mode,grep
doesn't actually output anything (to either stdout or stderr), but instead just exits with 0 iff any lines matched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I used -s
instead of -q
to avoid printing File not found
for Makefile
in typescript projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about that one! nice.
@@ -166,6 +175,7 @@ jobs: | |||
env: | |||
KLOTHO_LOGIN: ${{ inputs.klotho-login }} | |||
- name: typescript compilation | |||
if: steps.get_language.outputs.language == 'ts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
|
This PR adds support for multiple languages (specifically including Python) through the following means:
Makefile
containing aninteg-test
ruleStandard checks