| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@ShubhamSood1406 for this issue we need to install the scanapi with the corresponding version received from the parameter. I only see the README.md file changed here. Was it by mistake? |
Sorry, something went wrong.
Can you explain what else to change to fix this issue? |
Sorry, something went wrong.
|
@ShubhamSood1406 I believe these are the steps to make it work:
inputs:
scanapi_version:
description: 'The ScanAPI version to be installed'
required: false
default: 'latest'
arguments:
...
args:
- ${{ inputs.scanapi_version }}
- ${{ inputs.arguments }}
|
Sorry, something went wrong.
|
@camilamaia I updated the files, please review it and tell if I need to change anything else. |
Sorry, something went wrong.
|
@ShubhamSood1406 thanks for the changes! Just one caveat here, we need to ensure all the scanapi CLI arguments will be passed too. This commented line was responsible to do it. You still need to pass all the arguments, except the first, which is the version one. Also, would you mind ppdating the README inputs section with the input scanapi_version info? |
Sorry, something went wrong.
@camilamaia I updated the file, please check and tell if anything else to change. |
Sorry, something went wrong.
|
@camilamaia Please review this PR to be accepted in Hacktoberfest. |
Sorry, something went wrong.
There was a problem hiding this comment.
Hey, I left the suggestions in order to make it work.
Here is the example I used to test it:
This was the key to solve it: https://stackoverflow.com/questions/9057387/process-all-arguments-except-the-first-one-in-a-bash-script
Sorry, something went wrong.
| - name: Run automated API tests | ||
| uses: scanapi/github-action@v1 | ||
| with: | ||
| scanapi_version: '==2.0.0' |
There was a problem hiding this comment.
| scanapi_version: '==2.0.0' | |
| scanapi_version: '2.0.0' |
Sorry, something went wrong.
There was a problem hiding this comment.
Is there a reason for removing this feature?
Sorry, something went wrong.
There was a problem hiding this comment.
Everything looks good to me. I would probably add a feature to specify the version in PIP version specifier syntax ('==1.2.3', '~=1.2', etc.) as it was added by @ShubhamSood1406. This would add the capability for users to automatically use the latest version if the patch version is changed and not to update when major updates (with braking changes) occur.
Oh, that makes sense, now I got the point of the way you implemented it on poetry-publish. I agree with you 👍
Sorry, something went wrong.
|
|
||
| ### `scanapi_version` | ||
|
|
||
| Default version of scanapi to install. |
There was a problem hiding this comment.
| Default version of scanapi to install. | |
| The version of ScanAPI to install (default: latest). |
Sorry, something went wrong.
| sh -c "scanapi $*" | ||
|
|
||
| if [ $1 != 'latest' ]; then | ||
| pip install scanapi$1 |
There was a problem hiding this comment.
| pip install scanapi$1 | |
| pip install "scanapi=="$1 |
Sorry, something went wrong.
|
@JRubics I added you to review this PR since you are the github action expert here! Feel free to suggest any changes :) |
Sorry, something went wrong.
|
Done with the changes according to the suggestions. You can review it. @camilamaia |
Sorry, something went wrong.
|
Everything looks good to me. I would probably add a feature to specify the version in PIP version specifier syntax ('==1.2.3', '~=1.2', etc.) as it was added by @ShubhamSood1406. This would add the capability for users to automatically use the latest version if the patch version is changed and not to update when major updates (with braking changes) occur. |
Sorry, something went wrong.
There was a problem hiding this comment.
@ShubhamSood1406 I made the suggestions based on what @JRubics proposed. Sorry for the rework, I did not get the idea of the feature before.
Sorry, something went wrong.
| @@ -1,5 +1,9 @@ | |||
| #!/bin/bash | |||
|
|
|||
| set -e | |||
There was a problem hiding this comment.
@ShubhamSood1406 can we have this back?
Sorry, something went wrong.
| - name: Run automated API tests | ||
| uses: scanapi/github-action@v1 | ||
| with: | ||
| scanapi_version: '2.0.0' |
There was a problem hiding this comment.
| scanapi_version: '2.0.0' | |
| scanapi_version: '==2.0.0' # (PIP version specifier syntax) |
Sorry, something went wrong.
|
|
||
| set -e | ||
| if [ $1 != 'latest' ]; then | ||
| pip install "scanapi=="$1 |
There was a problem hiding this comment.
| pip install "scanapi=="$1 | |
| pip install scanapi$1 |
Sorry, something went wrong.
Done @camilamaia |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
#3 is solved now and ready to be merged.