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 Azure environment and Armstrong number tests #1

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

rabestro
Copy link
Owner

@rabestro rabestro commented Apr 1, 2024

Introduced an Azure environment for the exercism API tests. Furthermore, added new test cases for Armstrong numbers (specifically, the number zero and single digits). These tests are designed to check HTTP responses from queries involving these numbers. The test script path has also been updated in package.json.

Summary by CodeRabbit

  • New Features
    • Introduced API tests for the Bruno application, including tests for Armstrong numbers and configuration for Azure environments.
  • Tests
    • Added workflows to run API tests on Ubuntu, ensuring code quality and functionality.
  • Chores
    • Updated the test script in package.json for enhanced test execution.

Introduced an Azure environment for the exercism API tests. Furthermore, added new test cases for Armstrong numbers (specifically, the number zero and single digits). These tests are designed to check HTTP responses from queries involving these numbers. The test script path has also been updated in package.json.
@rabestro rabestro self-assigned this Apr 1, 2024
Copy link
Contributor

coderabbitai bot commented Apr 1, 2024

Walkthrough

The recent updates introduce a new GitHub workflow specifically for running API tests on the Bruno application, alongside additional test functionalities for Armstrong numbers within the Exercism project. These changes include the setup of an Azure environment for testing, adjustments to the test execution command in package.json, and the organization of test files and configurations to streamline the testing process.

Changes

File Path Change Summary
.github/workflows/api-tests-bruno.yaml Adds a new workflow for API tests on Ubuntu for the Bruno application.
exercism-api-tests/armstrong-numbers/... Introduces tests for validating single digits and zero as Armstrong numbers.
exercism-api-tests/bruno.json Defines a new collection named "Exercism Azure Functions" with ignore patterns.
exercism-api-tests/environments/azure.bru Sets up a configuration for the Azure host URL.
package.json Modifies the test script to navigate to a specific directory before executing tests.

🐇✨
In the realm of code and might,
Where tests run deep into the night,
A rabbit hopped, with joy so bright,
For Armstrong's numbers took to flight.
🌌🚀
With each push and pull, they strive,
To keep the magic code alive.
🎉🐰

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b8d9dd6 and 92a6255.
Files selected for processing (6)
  • .github/workflows/api-tests-bruno.yaml (1 hunks)
  • exercism-api-tests/armstrong-numbers/Single digits are Armstrong numbers.bru (1 hunks)
  • exercism-api-tests/armstrong-numbers/Zero is Armstrong numbers.bru (1 hunks)
  • exercism-api-tests/bruno.json (1 hunks)
  • exercism-api-tests/environments/azure.bru (1 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • exercism-api-tests/bruno.json
Additional Context Used
Additional comments not posted (5)
exercism-api-tests/environments/azure.bru (1)

1-3: The configuration for the Azure environment is correctly set up. Ensure that the URL provided is intended for public or testing purposes and does not expose sensitive information.

exercism-api-tests/armstrong-numbers/Zero is Armstrong numbers.bru (1)

1-19: The test case for verifying that 0 is recognized as an Armstrong number is well-structured. Ensure that the API's response structure matches the expectations set in the assertion.

exercism-api-tests/armstrong-numbers/Single digits are Armstrong numbers.bru (1)

1-19: The test case for verifying that single-digit numbers are recognized as Armstrong numbers is correctly structured. As with the previous test case, ensure the API's response structure is consistent with the assertion's expectations.

package.json (1)

7-7: The update to the test script in package.json is syntactically correct. Ensure that the directory path exercism-api-tests exists and that the bru command is correctly configured to run in the specified environment.

.github/workflows/api-tests-bruno.yaml (1)

1-28: The GitHub Actions workflow for running API tests is well-structured and follows best practices. Ensure that the report.xml file is correctly generated by the test command and located as specified for the test report publishing step to work as intended.

@rabestro rabestro merged commit a6bbcf2 into main Apr 1, 2024
@rabestro rabestro deleted the develop branch April 1, 2024 18:34
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.

None yet

1 participant