-
Notifications
You must be signed in to change notification settings - Fork 23
test: enable rekor search ui tests #1478
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMain CI workflow updated so e2e job now installs Playwright (with system dependencies) and runs the full Go e2e test suite including Rekor search UI tests, instead of excluding them. Flow diagram for updated e2e job execution with Playwright and full test suiteflowchart TD
A[Start_e2e_job] --> B[Set_environment_variables]
B --> C[Export_TUF_URL]
C --> D[Export_TSA_URL]
D --> E[Export_CLI_STRATEGY_cli_server]
E --> F[Export_CLI_SERVER_URL]
F --> G[Change_directory_to_e2e]
G --> H[Source_tas_env_variables]
H --> I[Install_Playwright_with_dependencies_using_go_run]
I --> J[Run_go_test_v_test_all_packages]
J --> K[Execute_Rekor_search_UI_tests]
J --> L[Execute_other_e2e_tests]
K --> M[Collect_test_results]
L --> M
M --> N[End_e2e_job]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ec153ed to
d51f3d6
Compare
Signed-off-by: Kristian Da Costa Menezes <[email protected]>
3edbb8d to
742ab17
Compare
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- The
go run github.com/playwright-community/playwright-go/cmd/playwright install --with-depsinvocation pulls the latest version on every run; consider pinning a specific module version (e.g.@vX.Y.Z) to keep CI runs reproducible and avoid unexpected breakages from upstream changes. - Installing Playwright with
--with-depson every main workflow run could add noticeable time and potential flakiness; consider caching the Playwright binaries or moving the heavy installation to a reusable setup step so subsequent jobs can reuse the installation.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps` invocation pulls the latest version on every run; consider pinning a specific module version (e.g. `@vX.Y.Z`) to keep CI runs reproducible and avoid unexpected breakages from upstream changes.
- Installing Playwright with `--with-deps` on every main workflow run could add noticeable time and potential flakiness; consider caching the Playwright binaries or moving the heavy installation to a reusable setup step so subsequent jobs can reuse the installation.
## Individual Comments
### Comment 1
<location> `.github/workflows/main.yml:610` </location>
<code_context>
- # exclude UI tests
- go test -v $(go list ./test/... | grep -v rekorsearchui)
+ # Install Playwright with dependencies for UI tests
+ go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps
+ go test -v ./test/...
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Pin the Playwright Go CLI dependency to a specific version instead of using `latest`.
`go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps` without a version suffix will always pull the latest CLI, which can cause unexpected CI failures when upstream changes. Please pin a specific version, e.g. `.../cmd/[email protected]`, and update it deliberately as needed.
Suggested implementation:
```
# Install Playwright with dependencies for UI tests (pinned version)
go run github.com/playwright-community/playwright-go/cmd/[email protected] install --with-deps
```
1. Confirm `v0.430.0` (or whichever version you choose) is a valid tag for `github.com/playwright-community/playwright-go` and matches the version used elsewhere in your project (e.g. in `go.mod`).
2. Optionally, document in your CONTRIBUTING.md or a CI README which version is pinned and how/when to update it.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
9b8b0c5 to
742ab17
Compare
User description
Summary by Sourcery
Enable Rekor search UI end-to-end tests in the main CI workflow by installing Playwright dependencies and running the full e2e test suite.
CI:
PR Type
Tests
Description
Enable Rekor search UI tests in CI pipeline
Install Playwright with dependencies for browser automation
Remove exclusion filter for UI tests in test execution
Fix whitespace formatting in CLI_STRATEGY export
Diagram Walkthrough
File Walkthrough
main.yml
Enable UI tests and install Playwright in CI.github/workflows/main.yml
support
export