Skip to content

selenium for github CI#240

Merged
rkrenn merged 35 commits intomasterfrom
selenium0
Jun 23, 2022
Merged

selenium for github CI#240
rkrenn merged 35 commits intomasterfrom
selenium0

Conversation

@rkrenn
Copy link
Copy Markdown
Collaborator

@rkrenn rkrenn commented Jun 13, 2022

#todo

Summary by CodeRabbit

  • Chores

    • Streamlined CI by moving setup logic into reusable scripts for database, application server, and test environment.
    • Updated workflow triggers to ignore localization-only branches.
    • Standardized JDK installation and centralized master data download and permissions.
  • Tests

    • Added a Selenium-based smoke test running headlessly to validate basic app availability.
    • Consolidated database initialization and configuration into scripted steps for more reliable test runs.
    • Simplified test orchestration, reducing inline commands and improving maintainability.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rkrenn rkrenn merged commit 867276f into master Jun 23, 2022
@rkrenn
Copy link
Copy Markdown
Collaborator Author

rkrenn commented Aug 21, 2025

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 21, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Replaces branch filters in build/test workflows and migrates the CI pipeline to script-driven steps. Adds shell and Perl scripts for database setup/initialization, master data download, Tomcat deployment, Selenium environment provisioning, and a simple Selenium test runner. The test workflow now invokes these scripts instead of inline commands.

Changes

Cohort / File(s) Summary
Workflow configs
.github/workflows/build.yml, .github/workflows/test.yml
Switch pull_request branch filter to branches-ignore. Overhaul test.yml to call repository scripts for JDK install, DB setup/init, master data download, Tomcat and Selenium setup, and Selenium test execution.
CI helper scripts
.github/workflows/download_masterdata.sh, .github/workflows/init_database.sh, .github/workflows/setup_database.sh, .github/workflows/setup_selenium.sh, .github/workflows/setup_tomcat.sh
New scripts: download/extract master data to /ctsms; initialize DB content via dbtool; bootstrap PostgreSQL schema/users and load SQL; install Chromedriver, Selenium Server, and Perl client; install/deploy WAR to Tomcat 9.
Selenium test runner
.github/workflows/seleniumtest.pl
New Perl script using Selenium::Remote::Driver to open http://localhost:8080, print page HTML, and quit.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as GitHub Actions Runner
    participant WF as test.yml
    participant DB as setup_database.sh
    participant INIT as init_database.sh
    participant DATA as download_masterdata.sh
    participant TC as setup_tomcat.sh
    participant SEL as setup_selenium.sh
    participant SE as Selenium Server
    participant APP as Tomcat (ctsms)
    participant PG as PostgreSQL
    participant GH as GitHub API/Artifacts

    Dev->>WF: Trigger workflow (PR/push)
    WF->>DB: Execute DB bootstrap
    DB->>PG: Start/configure PG, create DB/user, load SQL
    WF->>DATA: Download master data
    DATA->>GH: Fetch archives (config + master-data)
    DATA->>WF: Extract to /ctsms/*
    WF->>INIT: Initialize DB content
    INIT->>PG: Load criteria, permissions, MIME types
    WF->>TC: Install Tomcat and deploy WAR
    TC->>APP: Start ctsms app
    WF->>SEL: Provision Selenium/Chromedriver
    SEL->>SE: Start Selenium (jar available)
    WF->>SE: Run seleniumtest.pl via driver
    SE->>APP: Open http://localhost:8080
    APP-->>SE: Return HTML
    SE-->>WF: Test result/output
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–75 minutes

Possibly related PRs

Poem

A whisk of scripts, a hop through CI night,
I fetched the data, set DBs just right.
Tomcat warmed, Selenium took flight—
Nibbled the homepage, crisp and bright.
Thump goes my paw: green checks in sight! 🐇✅


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d076c12 and 50ebf73.

📒 Files selected for processing (8)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/download_masterdata.sh (1 hunks)
  • .github/workflows/init_database.sh (1 hunks)
  • .github/workflows/seleniumtest.pl (1 hunks)
  • .github/workflows/setup_database.sh (1 hunks)
  • .github/workflows/setup_selenium.sh (1 hunks)
  • .github/workflows/setup_tomcat.sh (1 hunks)
  • .github/workflows/test.yml (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch selenium0

🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

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