Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal committed Dec 19, 2023
1 parent 92ba8a1 commit 366664a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ run:
test: test-1 test-2 test-3 test-4 test-5

test-1:
@bash ./entrypoint.sh 1.1.1 $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)

test-2:
@bash ./entrypoint.sh 1.1.1 'validate' $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)
@bash ./entrypoint.sh $(DEFAULT_VERSION) 'validate' $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)

test-3:
@bash ./entrypoint.sh 1.1.1 'validate' './test/specification-invalid.yml' $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)
@bash ./entrypoint.sh $(DEFAULT_VERSION) 'validate' './test/specification-invalid.yml' $(DEFAULT_TEMPLATE) $(DEFAULT_LANGUAGE) $(DEFAULT_OUTPUT) $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)

test-4:
@bash ./entrypoint.sh $(DEFAULT_VERSION) $(DEFAULT_COMMAND) $(TEST_FILEPATH) $(DEFAULT_TEMPLATE) 'typescript' './output/custom-output' $(DEFAULT_PARAMETERS) $(DEFAULT_CUSTOM_COMMANDS)
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "::group::Debug information"
if [ -n "$CLI_VERSION" ] && [ ! "$CLI_VERSION" == "latest" ]; then
echo -e "${BLUE}CLI version:${NC}" "$CLI_VERSION"
# Check if the CLI version is already installed or not
output=$(asyncapi --version 2>&1)
output=$(asyncapi --version >/dev/null 2>&1)
# output @asyncapi/cli/1.1.1 linux-x64 node-v20.8.1
version=$(echo "$output" | cut -d' ' -f1 | cut -d '/' -f3)
if [ "$version" == "$CLI_VERSION" ]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "github-action-for-generator",
"description": "This is to be used for running tests for the GitHub Action using the MakeFile",
"scripts": {
"test": "make test",
"test": "npm install -g @asyncapi/cli && make test",
"generate:assets": "echo 'No additional assets need to be generated at the moment'",
"docker:build": "docker build -t asyncapi/github-action-for-generator:latest ."
},
Expand Down

0 comments on commit 366664a

Please sign in to comment.