Skip to content

test action on itself #27

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

Draft
wants to merge 45 commits into
base: main
Choose a base branch
from
Draft

test action on itself #27

wants to merge 45 commits into from

Conversation

oycyc
Copy link
Collaborator

@oycyc oycyc commented May 12, 2025

Describe your changes

Reminder:

  • When the PR is ready, be sure to run npm run build to compile into the distribution /dist folder, which is the source code that the Action uses.

Copy link

coderabbitai bot commented May 12, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented May 12, 2025

Below is the Action testing on itself with this PR's source code against the /examples directory. Confirm it is as expected.

File Status Passed Total Coverage Details
./examples/tests/track-using-labels_test.rego ✅ PASS 8 8 45.45%
Uncovered Lines3, 5, 12-13, 23-26, 35, 37-38, 41
Show Details✅ test_track_different_branches
✅ test_propose_non_empty_branch
✅ test_propose_empty_branch
✅ test_affected_directory
✅ test_affected_extension
✅ test_not_affected_directory
✅ test_not_affected_extension
✅ test_ignore_not_affected
./examples/tests/cancel-in-progress-runs_test.rego ❌ FAIL 1 2 N/A
Show Details✅ test_cancel_runs_allowed
❌ test_cancel_runs_denied
./examples/tests/enforce-module-use-policy_test.rego ✅ PASS 4 4 47.83%
Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80
Show Details✅ test_deny_creation_of_controlled_resource_type
✅ test_deny_update_of_controlled_resource_type
✅ test_allow_deletion_of_controlled_resource_type
✅ test_allow_creation_of_uncontrolled_resource_type
./examples/tests/readers-writers-admins-teams_test.rego ✅ PASS 6 6 83.33%
Uncovered Lines16, 24, 28
Show Details✅ test_allow_writers
✅ test_allow_admins
✅ test_allow_readers
✅ test_space_admin_access
✅ test_space_write_access
✅ test_space_read_access
./examples/tests/do-not-delete-stateful-resources_test.rego ✅ PASS 5 5 85.71%
Uncovered Lines34
Show Details✅ test_deny_s3_bucket_deletion
✅ test_deny_db_instance_deletion
✅ test_deny_efs_file_system_deletion
✅ test_deny_dynamodb_table_deletion
✅ test_allow_instance_deletion
./examples/tests/enforce-password-length_test.rego ✅ PASS 3 3 90.91%
Uncovered Lines29
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters
✅ test_warn_creation_of_password_between_16_and_20_characters
✅ test_allow_creation_of_password_longer_than_20_characters
./examples/tests/ignore-changes-outside-root_test.rego ✅ PASS 12 12 92.86%
Uncovered Lines40
Show Details✅ test_affected_no_files
✅ test_affected_tf_files
✅ test_affected_no_tf_files
✅ test_affected_outside_project_root
✅ test_ignore_affected
✅ test_ignore_not_affected
✅ test_ignore_tag
✅ test_propose_affected
✅ test_propose_not_affected
✅ test_track_affected
✅ test_track_not_affected
✅ test_track_not_stack_branch
./examples/tests/notification-stack-failure-origins_test.rego ✅ PASS 7 7 96.67%
Uncovered Lines80
Show Details✅ test_slack_notification_for_tracked_failed_run
✅ test_no_slack_notification_for_non_tracked_run
✅ test_no_slack_notification_for_successful_run
✅ test_slack_notification_with_unknown_github_user
✅ test_pr_comment_for_tracked_failed_run
✅ test_no_pr_comment_for_non_tracked_run
✅ test_no_pr_comment_for_successful_run
./examples/drift-detection.rego ⚠️ NO TESTS 0 0 N/A
Show DetailsNo test file found

Report generated by 🧪 GitHub Actions for OPA Rego Test

Copy link
Contributor

github-actions bot commented May 12, 2025

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
100% (+9.93% 🔼)
38/38
🟢 Branches
100% (+15.49% 🔼)
8/8
🟢 Functions
100% (+18.18% 🔼)
6/6
🟢 Lines
100% (+9.59% 🔼)
38/38
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢 testResultProcessing.ts 100% 100% 100% 100%

Test suite run success

8 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 4f78690

Copy link
Contributor

github-actions bot commented May 14, 2025

Below is the Action testing on itself with this PR's source code against the /examples directory. Confirm it is as expected.

File Status Passed Total Coverage Details
./examples/tests/track-using-labels_test.rego ✅ PASS 8 8 45.45%
Uncovered Lines3, 5, 12-13, 23-26, 35, 37-38, 41
Show Details✅ test_track_different_branches
✅ test_propose_non_empty_branch
✅ test_propose_empty_branch
✅ test_affected_directory
✅ test_affected_extension
✅ test_not_affected_directory
✅ test_not_affected_extension
✅ test_ignore_not_affected
./examples/tests/cancel-in-progress-runs_test.rego ❌ FAIL 1 2 N/A
Show Details✅ test_cancel_runs_allowed
❌ test_cancel_runs_denied
./examples/tests/enforce-module-use-policy_test.rego ✅ PASS 4 4 47.83%
Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80
Show Details✅ test_deny_creation_of_controlled_resource_type
✅ test_deny_update_of_controlled_resource_type
✅ test_allow_deletion_of_controlled_resource_type
✅ test_allow_creation_of_uncontrolled_resource_type
./examples/tests/readers-writers-admins-teams_test.rego ✅ PASS 6 6 83.33%
Uncovered Lines16, 24, 28
Show Details✅ test_allow_writers
✅ test_allow_admins
✅ test_allow_readers
✅ test_space_admin_access
✅ test_space_write_access
✅ test_space_read_access
./examples/tests/do-not-delete-stateful-resources_test.rego ✅ PASS 5 5 85.71%
Uncovered Lines34
Show Details✅ test_deny_s3_bucket_deletion
✅ test_deny_db_instance_deletion
✅ test_deny_efs_file_system_deletion
✅ test_deny_dynamodb_table_deletion
✅ test_allow_instance_deletion
./examples/tests/enforce-password-length_test.rego ✅ PASS 3 3 90.91%
Uncovered Lines29
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters
✅ test_warn_creation_of_password_between_16_and_20_characters
✅ test_allow_creation_of_password_longer_than_20_characters
./examples/tests/ignore-changes-outside-root_test.rego ✅ PASS 12 12 92.86%
Uncovered Lines40
Show Details✅ test_affected_no_files
✅ test_affected_tf_files
✅ test_affected_no_tf_files
✅ test_affected_outside_project_root
✅ test_ignore_affected
✅ test_ignore_not_affected
✅ test_ignore_tag
✅ test_propose_affected
✅ test_propose_not_affected
✅ test_track_affected
✅ test_track_not_affected
✅ test_track_not_stack_branch
./examples/tests/notification-stack-failure-origins_test.rego ✅ PASS 7 7 96.67%
Uncovered Lines80
Show Details✅ test_slack_notification_for_tracked_failed_run
✅ test_no_slack_notification_for_non_tracked_run
✅ test_no_slack_notification_for_successful_run
✅ test_slack_notification_with_unknown_github_user
✅ test_pr_comment_for_tracked_failed_run
✅ test_no_pr_comment_for_non_tracked_run
✅ test_no_pr_comment_for_successful_run
./examples/drift-detection.rego ⚠️ NO TESTS 0 0 N/A
Show DetailsNo test file found

Report generated by 🧪 GitHub Actions for OPA Rego Test

Copy link
Contributor

github-actions bot commented May 14, 2025

Below is the Action testing on itself with this PR's source code against the /examples directory. Confirm it is as expected.

File Status Passed Total Coverage Details
./examples/tests/track-using-labels_test.rego ✅ PASS 8 8 45.45%
Uncovered Lines3, 5, 12-13, 23-26, 35, 37-38, 41
Show Details✅ test_track_different_branches
✅ test_propose_non_empty_branch
✅ test_propose_empty_branch
✅ test_affected_directory
✅ test_affected_extension
✅ test_not_affected_directory
✅ test_not_affected_extension
✅ test_ignore_not_affected
./examples/tests/cancel-in-progress-runs_test.rego ✅ PASS 2 2 83.33%
Uncovered Lines16
Show Details✅ test_cancel_runs_allowed
✅ test_cancel_runs_denied
./examples/tests/enforce-module-use-policy_test.rego ✅ PASS 4 4 47.83%
Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80
Show Details✅ test_deny_creation_of_controlled_resource_type
✅ test_deny_update_of_controlled_resource_type
✅ test_allow_deletion_of_controlled_resource_type
✅ test_allow_creation_of_uncontrolled_resource_type
./examples/tests/readers-writers-admins-teams_test.rego ✅ PASS 6 6 83.33%
Uncovered Lines16, 24, 28
Show Details✅ test_allow_writers
✅ test_allow_admins
✅ test_allow_readers
✅ test_space_admin_access
✅ test_space_write_access
✅ test_space_read_access
./examples/tests/do-not-delete-stateful-resources_test.rego ✅ PASS 5 5 85.71%
Uncovered Lines34
Show Details✅ test_deny_s3_bucket_deletion
✅ test_deny_db_instance_deletion
✅ test_deny_efs_file_system_deletion
✅ test_deny_dynamodb_table_deletion
✅ test_allow_instance_deletion
./examples/tests/enforce-password-length_test.rego ✅ PASS 3 3 90.91%
Uncovered Lines29
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters
✅ test_warn_creation_of_password_between_16_and_20_characters
✅ test_allow_creation_of_password_longer_than_20_characters
./examples/tests/ignore-changes-outside-root_test.rego ✅ PASS 12 12 92.86%
Uncovered Lines42
Show Details✅ test_affected_no_files
✅ test_affected_tf_files
✅ test_affected_no_tf_files
✅ test_affected_outside_project_root
✅ test_ignore_affected
✅ test_ignore_not_affected
✅ test_ignore_tag
✅ test_propose_affected
✅ test_propose_not_affected
✅ test_track_affected
✅ test_track_not_affected
✅ test_track_not_stack_branch
./examples/tests/notification-stack-failure-origins_test.rego ✅ PASS 7 7 96.67%
Uncovered Lines80
Show Details✅ test_slack_notification_for_tracked_failed_run
✅ test_no_slack_notification_for_non_tracked_run
✅ test_no_slack_notification_for_successful_run
✅ test_slack_notification_with_unknown_github_user
✅ test_pr_comment_for_tracked_failed_run
✅ test_no_pr_comment_for_non_tracked_run
✅ test_no_pr_comment_for_successful_run
./examples/drift-detection.rego ⚠️ NO TESTS 0 0 N/A
Show DetailsNo test file found

Report generated by 🧪 GitHub Actions for OPA Rego Test

Copy link
Contributor

github-actions bot commented May 20, 2025

Below is the Action testing on itself with this PR's source code against policies in /examples file by file. Confirm it is as expected.

File Status Passed Total Coverage Details
./examples/tests/track-using-labels_test.rego ✅ PASS 8 8 45.45%
Uncovered Lines3, 5, 12-13, 23-26, 35, 37-38, 41
Show Details✅ test_track_different_branches
✅ test_propose_non_empty_branch
✅ test_propose_empty_branch
✅ test_affected_directory
✅ test_affected_extension
✅ test_not_affected_directory
✅ test_not_affected_extension
✅ test_ignore_not_affected
./examples/tests/cancel-in-progress-runs_test.rego ✅ PASS 2 2 83.33%
Uncovered Lines16
Show Details✅ test_cancel_runs_allowed
✅ test_cancel_runs_denied
./examples/tests/enforce-module-use-policy_test.rego ✅ PASS 3 3 47.83%
Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80
Show Details✅ test_deny_creation_of_controlled_resource_type
✅ test_deny_update_of_controlled_resource_type
✅ test_allow_creation_of_uncontrolled_resource_type
./examples/tests/readers-writers-admins-teams_test.rego ✅ PASS 6 6 83.33%
Uncovered Lines16, 24, 28
Show Details✅ test_allow_writers
✅ test_allow_admins
✅ test_allow_readers
✅ test_space_admin_access
✅ test_space_write_access
✅ test_space_read_access
./examples/tests/do-not-delete-stateful-resources_test.rego ✅ PASS 5 5 85.71%
Uncovered Lines34
Show Details✅ test_deny_s3_bucket_deletion
✅ test_deny_db_instance_deletion
✅ test_deny_efs_file_system_deletion
✅ test_deny_dynamodb_table_deletion
✅ test_allow_instance_deletion
./examples/tests/enforce-password-length_test.rego ✅ PASS 3 3 90.91%
Uncovered Lines29
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters
✅ test_warn_creation_of_password_between_16_and_20_characters
✅ test_allow_creation_of_password_longer_than_20_characters
./examples/tests/ignore-changes-outside-root_test.rego ✅ PASS 12 12 92.86%
Uncovered Lines42
Show Details✅ test_affected_no_files
✅ test_affected_tf_files
✅ test_affected_no_tf_files
✅ test_affected_outside_project_root
✅ test_ignore_affected
✅ test_ignore_not_affected
✅ test_ignore_tag
✅ test_propose_affected
✅ test_propose_not_affected
✅ test_track_affected
✅ test_track_not_affected
✅ test_track_not_stack_branch
./examples/tests/notification-stack-failure-origins_test.rego ✅ PASS 7 7 96.67%
Uncovered Lines80
Show Details✅ test_slack_notification_for_tracked_failed_run
✅ test_no_slack_notification_for_non_tracked_run
✅ test_no_slack_notification_for_successful_run
✅ test_slack_notification_with_unknown_github_user
✅ test_pr_comment_for_tracked_failed_run
✅ test_no_pr_comment_for_non_tracked_run
✅ test_no_pr_comment_for_successful_run
./examples/drift-detection.rego ⚠️ NO TESTS 0 0 N/A
Show DetailsNo test file found

Report generated by 🧪 GitHub Actions for OPA Rego Test

Copy link
Contributor

github-actions bot commented May 20, 2025

Below is the Action testing on itself with this PR's source code against /spacelift_policies entire package directory. Confirm it is as expected.

File Status Passed Total Coverage Details
examples/tests/cancel-in-progress-runs_test.rego ✅ PASS 2 2 83.33%
Uncovered Lines16
Show Details✅ test_cancel_runs_allowed
✅ test_cancel_runs_denied
examples/tests/do-not-delete-stateful-resources_test.rego ✅ PASS 5 5 85.71%
Uncovered Lines34
Show Details✅ test_deny_s3_bucket_deletion
✅ test_deny_db_instance_deletion
✅ test_deny_efs_file_system_deletion
✅ test_deny_dynamodb_table_deletion
✅ test_allow_instance_deletion
examples/tests/enforce-module-use-policy_test.rego ✅ PASS 3 3 47.83%
Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80
Show Details✅ test_deny_creation_of_controlled_resource_type
✅ test_deny_update_of_controlled_resource_type
✅ test_allow_creation_of_uncontrolled_resource_type
examples/tests/enforce-password-length_test.rego ✅ PASS 3 3 90.91%
Uncovered Lines29
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters
✅ test_warn_creation_of_password_between_16_and_20_characters
✅ test_allow_creation_of_password_longer_than_20_characters
examples/tests/ignore-changes-outside-root_test.rego ✅ PASS 12 12 92.86%
Uncovered Lines42
Show Details✅ test_affected_no_files
✅ test_affected_tf_files
✅ test_affected_no_tf_files
✅ test_affected_outside_project_root
✅ test_ignore_affected
✅ test_ignore_not_affected#01
✅ test_ignore_tag
✅ test_propose_affected
✅ test_propose_not_affected
✅ test_track_affected
✅ test_track_not_affected
✅ test_track_not_stack_branch
examples/tests/notification-stack-failure-origins_test.rego ✅ PASS 7 7 96.67%
Uncovered Lines80
Show Details✅ test_slack_notification_for_tracked_failed_run
✅ test_no_slack_notification_for_non_tracked_run
✅ test_no_slack_notification_for_successful_run
✅ test_slack_notification_with_unknown_github_user
✅ test_pr_comment_for_tracked_failed_run
✅ test_no_pr_comment_for_non_tracked_run
✅ test_no_pr_comment_for_successful_run
examples/tests/readers-writers-admins-teams_test.rego ✅ PASS 6 6 83.33%
Uncovered Lines16, 24, 28
Show Details✅ test_allow_writers
✅ test_allow_admins
✅ test_allow_readers
✅ test_space_admin_access
✅ test_space_write_access
✅ test_space_read_access
examples/tests/track-using-labels_test.rego ✅ PASS 8 8 86.36%
Uncovered Lines3, 12, 41
Show Details✅ test_track_different_branches
✅ test_propose_non_empty_branch
✅ test_propose_empty_branch
✅ test_affected_directory
✅ test_affected_extension
✅ test_not_affected_directory
✅ test_not_affected_extension
✅ test_ignore_not_affected
./examples/drift-detection.rego ⚠️ NO TESTS 0 0 N/A
Show DetailsNo test file found

Report generated by 🧪 GitHub Actions for OPA Rego Test

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.

1 participant