-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from vishnuchalla/ci-test-onpush
Making CI tests only on push
- Loading branch information
Showing
7 changed files
with
286 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: Image Push | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Execute tests | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at [email protected] | ||
or [email protected]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct | ||
enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
https://www.contributor-covenant.org/faq. Translations are available at | ||
https://www.contributor-covenant.org/translations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Contributing to Orion | ||
|
||
First off, thank you for considering contributing to our project! It's people like you who make our project better and more enjoyable to use. The following is a set of guidelines for contributing to our repository. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. | ||
|
||
## Table of Contents | ||
|
||
- [Code of Conduct](#code-of-conduct) | ||
- [How Can I Contribute?](#how-can-i-contribute) | ||
- [Reporting Bugs](#reporting-bugs) | ||
- [Suggesting Enhancements](#suggesting-enhancements) | ||
- [Submitting Pull Requests](#submitting-pull-requests) | ||
- [Development Guidelines](#development-guidelines) | ||
- [Branching Model](#branching-model) | ||
- [Coding Standards](#coding-standards) | ||
- [Commit Messages](#commit-messages) | ||
- [Issue Tracking](#issue-tracking) | ||
- [License](#license) | ||
|
||
## Code of Conduct | ||
|
||
By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). Please read it to understand the expected behavior. | ||
|
||
## How Can I Contribute? | ||
|
||
### Reporting Bugs | ||
|
||
If you encounter a bug, please open an issue on GitHub. Include the following details: | ||
|
||
- A clear and descriptive title. | ||
- A description of the problem and steps to reproduce it. | ||
- The expected outcome and what actually happened. | ||
- Screenshots, if applicable. | ||
- Any relevant logs or error messages. | ||
|
||
### Suggesting Enhancements | ||
|
||
We welcome suggestions for new features or improvements. When suggesting an enhancement: | ||
|
||
- Check if the feature is already being discussed. | ||
- Clearly describe the enhancement and its benefits. | ||
- Provide use cases where this would be useful. | ||
|
||
### Submitting Pull Requests | ||
|
||
1. **Fork** the repository. | ||
2. **Create a branch** for your feature (`git checkout -b feature/your-feature-name`). | ||
3. **Commit** your changes (`git commit -m 'Add some feature'`). | ||
4. **Push** to the branch (`git push origin feature/your-feature-name`). | ||
5. **Open a Pull Request** and describe your changes. | ||
|
||
### Testing your code changes | ||
|
||
We have CI tests already in place to test code changes from a fork repository as well. Once github actions is enabled in your fork, please run the below commands | ||
|
||
1. Install [Github CLI](https://cli.github.com/) and authenticate using the below command. | ||
``` | ||
vchalla@vchalla-thinkpadp1gen2:~/myforks/orion$ gh auth login | ||
? What account do you want to log into? GitHub.com | ||
? What is your preferred protocol for Git operations on this host? HTTPS | ||
? Authenticate Git with your GitHub credentials? Yes | ||
? How would you like to authenticate GitHub CLI? Paste an authentication token | ||
Tip: you can generate a Personal Access Token here https://github.com/settings/tokens | ||
The minimum required scopes are 'repo', 'read:org', 'workflow'. | ||
? Paste your authentication token: **************************************** | ||
- gh config set -h github.com git_protocol https | ||
✓ Configured git protocol | ||
✓ Logged in as vishnuchalla | ||
``` | ||
2. Set your fork as default repo to work with. For example | ||
``` | ||
vchalla@vchalla-thinkpadp1gen2:~/myforks/orion$ gh repo set-default vishnuchalla/orion | ||
``` | ||
3. List your availble workflows to run. | ||
``` | ||
vchalla@vchalla-thinkpadp1gen2:~/myforks/orion$ gh workflow list | ||
NAME STATE ID | ||
Builders active 111655972 | ||
CI tests active 112772727 | ||
Image Push active 112772728 | ||
Pylint active 111655973 | ||
Execute tests active 112772729 | ||
``` | ||
4. For example CI tests, we need an elasticsearch server as a runtime secret which can be configured using below command. | ||
``` | ||
vchalla@vchalla-thinkpadp1gen2:~/myforks/orion$ gh secret set QE_ES_SERVER --body 'YOUR_ES_SERVER' | ||
``` | ||
5. Now lets trigger CI tests using its ID with the below command. We should see github actions getting triggered instantly in the fork repo. | ||
``` | ||
vchalla@vchalla-thinkpadp1gen2:~/myforks/orion$ gh workflow run 112772727 | ||
✓ Created workflow_dispatch event for ci-tests.yaml at main | ||
To see runs for this workflow, try: gh run list --workflow=ci-tests.yaml | ||
``` | ||
Please make sure your code changes are in the same branch as your action workflows are configured to. | ||
|
||
Ensure that your code follows the project's coding standards and includes tests where appropriate. | ||
|
||
## Development Guidelines | ||
|
||
### Branching Model | ||
|
||
We use a simplified [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) branching model: | ||
|
||
- `main`: The latest stable release. | ||
- `develop`: The current development branch. | ||
- Feature branches: For new features and bug fixes (`feature/your-feature-name`). | ||
- Release branches: For preparing a new release (`release/v1.0.0`). | ||
|
||
### Coding Standards | ||
|
||
- Follow the coding style used in the project. This usually includes indentation, naming conventions, and commenting. | ||
- Write clear and concise code. | ||
- Keep the code DRY (Don't Repeat Yourself) and SOLID principles in mind. | ||
|
||
### Commit Messages | ||
|
||
Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format: | ||
- `feat:` for new features | ||
- `fix:` for bug fixes | ||
- `docs:` for documentation updates | ||
- `style:` for code style changes (formatting, missing semi colons, etc.) | ||
- `refactor:` for code restructuring without changing behavior | ||
- `test:` for adding or updating tests | ||
- `chore:` for maintenance tasks | ||
|
||
Example: | ||
``` | ||
feat: add user login functionality | ||
``` | ||
|
||
## Issue Tracking | ||
|
||
We use GitHub Issues to track bugs, enhancements, and other requests. Please follow these guidelines when creating an issue: | ||
|
||
* **Search Existing Issues**: Before creating a new issue, please check if the issue already exists. If it does, you can add a comment to that issue instead of creating a duplicate. | ||
* **Be Descriptive**: Provide as much information as possible to help us understand and resolve the issue. This includes: | ||
* Steps to reproduce the issue | ||
* Expected behavior | ||
* Actual behavior | ||
* Screenshots or logs, if applicable | ||
* **Use Labels**: Apply relevant labels to help us categorize the issue (e.g., bug, enhancement, documentation, etc.). | ||
|
||
## License | ||
|
||
By contributing to this project, you agree that your contributions will be licensed under the project's existing [license](LICENSE). Please ensure that your contributions are compatible with this license. |