EasyEnvPreview |
---|
A web application focused on enabling developers and QA engineers to easily switch Git branches and run tests across multiple repositories to validate code changes |
🐞 Report a bug or 🙋♂️ request a feature |
This tool is perfect for teams that want to streamline their workflow and improve productivity.
We understand that some of our users may have limited experience with GitHub, so we've designed this tool to be user-friendly and accessible to everyone. Our tool only works with a configuration file and valid terminal scripts in bash, which means you can easily integrate it with your existing workflows and tools.
The core goal is to provide a robust server environment where users can switch Git branches, execute tests, and preview dynamic renditions of the codebase. This alleviates issues with slow local machines and networks.
The target users are primarily members of QA teams, with an expected 2-10 repositories connected, each with around 5 branches typically.
Key features include branch switching, test running, and dynamic previews. Custom terminal commands can also be configured as actions. Unlike a direct GitHub integration, this project does not utilize any external API for GitHub or any other provider. Instead, users are required to define any necessary integrations within the scripts themselves.
Sessions expire after 15 minutes to 2 hours of inactivity. Strict data privacy practices are followed, with no Personally Identifiable Information (PII) collected or stored. Logging is directed to local text files, and a basic health check endpoint is provided for monitoring.
It's important to note that direct terminal commands are not evaluated from the website. Instead, only pre-programmed scripts can be executed. This approach enhances security by preventing users from executing potentially dangerous commands directly on the server's terminal. This design ensures a controlled and secure environment for executing predefined actions.
In addition, we've made sure that our tool is easy to set up and use, so you can get started quickly and start enjoying the benefits of a centralized server. We're confident that EasyEnvPreview will be a valuable asset to your team and help you streamline your workflows.
When creating custom actions to execute via EasyEnvPreview, keep in mind the following best practices:
- Avoid hardcoding secrets or passwords: Any sensitive credentials should be passed in via environment variables or key management services. Hardcoded secrets in scripts risk exposure.
- Limit filesystem access: Scripts should not erase files or modify filesystem locations outside of the repository workspace. This prevents unintended changes.
- Sanitize user input: If accepting input from the UI, validate and sanitize to prevent injection of arbitrary code.
- Follow least privilege principles: Each script should have the minimum permissions necessary to do its job. Avoid overprivileged actions.
- Do not log sensitive information: Avoid logging personal data, API keys, access tokens, or other confidential information.
- Use timeout limits: Scripts running too long can overloaded shared resources. Use timeouts, rate limiting, throttling.
- Validate return codes: Check return codes of commands and handle failures appropriately.
- Consider dependencies: Will scripts require additional languages, packages, or libraries to run successfully?
- Plan for contingencies: Have an error handling strategy for crashes, hangs, exceptions. Log enough for diagnostics.
- Comment properly: Use comments to document the script’s purpose, author, dependencies, changes etc.
EasyEnvPreview allows QA testers and other non-technical users to validate branches without coding knowledge. Here is a step-by-step example:
- Login to the EasyEnvPreview dashboard.
- Locate the "Server" repository card and click the "Change Branch" dropdown menu.
- Select the feat123-server branch specified by the developer.
- Repeat steps 2-3 to switch the "Client" repository to the feat123-client branch.
- Find the "Run Locally" action for the Server repository and click the "Run" button.
- Similarly, run the "Run Locally" action for the Client repository.
- On the Client repo, click the "Preview" action's "Run" button.
- Once the "Preview" action finishes, copy the URL from the response shown on the card.
- Paste that URL into your browser to view the application running from those feature branches.
- You can now validate, test, and provide feedback to the developer.
To start the EasyEnvPreview server, you have two options:
Prerequisites:
- Docker and Docker Compose installed
Steps:
- Clone the repository
- Navigate to the project directory
- Run
docker-compose up -d
- Access the application at
http://localhost:PORT
(replacePORT
with the actual port defined in the.env
file).
Prerequisites:
- Node.js 20+
- git
Steps:
- Clone the repository
- Run
npm install
to install dependencies - Create
.env
file with desired environment variables - Run
npm run dev
to start the dev server - Access the application at
http://localhost:3000
or replace 3000 with the actual port defined in the.env
file.
To run all tests:
npm run test
To run integration tests only:
npm run test:integration
To run end-to-end tests:
npm run test:e2e
Picture | Contact | Role |
---|---|---|
Victor Peña | Email me to [email protected] / Connect to my Linkedin | Mantainer |
Mid Senior Developer | ||
Israel Laguan | Email me to [email protected] / Connect to my Linkedin | Mantainer |
Senior Developer |
🤝 Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
🤗 Give a ⭐️ if you like this project!
Icons from:
📝 This project is licensed under the MIT
Feel free to fork this project and improve it