Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ENV PATH="~/.local/bin:${PATH}"

RUN pip install pip setuptools --upgrade

RUN pip install scanapi

ENTRYPOINT ["/entrypoint.sh"]

COPY entrypoint.sh /entrypoint.sh
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ An action that allows developers to run ScanAPI using github actions.

## Inputs

### `scanapi_version`

The version of ScanAPI to install (default: latest).

### `arguments`

Desired arguments to run scanapi. Allow multiple parameters separated by spaces. Default value is `--help`
Expand All @@ -17,6 +21,7 @@ The following will take the yaml file and produce a scanapi-report.html file as
- name: Run automated API tests
uses: scanapi/github-action@v1
with:
scanapi_version: '==2.0.0'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
scanapi_version: '==2.0.0'
scanapi_version: '2.0.0'

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for removing this feature?

Copy link
Member

Choose a reason for hiding this comment

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

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 👍

arguments: 'run ./scanapi.yaml'
```

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ branding:
icon: "align-justify"
color: "gray-dark"
inputs:
scanapi_version:
description: 'The ScanAPI version to be installed'
required: false
default: 'latest'
arguments:
description: "Desired arguments to run ScanAPI. Allow multiple parameters separated by spaces."
required: true
Expand All @@ -13,4 +17,5 @@ runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.scanapi_version }}
- ${{ inputs.arguments }}
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

set -e
Copy link
Member

Choose a reason for hiding this comment

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

@ShubhamSood1406 can we have this back?


sh -c "scanapi $*"
if [ $1 != 'latest' ]; then
pip install scanapi$1
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pip install scanapi$1
pip install "scanapi=="$1

else
pip install scanapi
fi

sh -c "scanapi ${@:2}"