Skip to content

Commit 30f741d

Browse files
authored
Merge pull request #146 from wayofdev/ci/e2e-testing
2 parents e7ad086 + ded9951 commit 30f741d

File tree

2 files changed

+81
-48
lines changed

2 files changed

+81
-48
lines changed

.github/CONTRIBUTING.md

Lines changed: 80 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,61 @@
11
# Contributing
22

3-
If you would like to contribute to this project, please open an issue or a pull request. We are always looking for ways to improve the project and would love to hear your ideas.
3+
Welcome to our project!
44

5-
The latest changes are always in master branch, so please make your Pull Request against that branch.
5+
We appreciate your interest in contributing. This guide will help you get started, ensuring an effective collaboration.
6+
7+
<br>
8+
9+
## 🗂 Table of Contents
10+
11+
* [Introduction](#-introduction)
12+
* [Development Requirements](#-development-requirements)
13+
* [Optional Tools](#-optional-tools)
14+
* [Using the Makefile](#-using-the-makefile)
15+
* [Workflow](#-workflow)
16+
* [Continuous Integration with GitHub Actions](#-continuous-integration-with-github-actions)
17+
* [Before You Contribute](#-before-you-contribute)
18+
* [Commit Message Guidelines](#-commit-message-guidelines)
19+
* [Coding Standards and Tools](#-coding-standards-and-tools)
20+
* [Yaml Lint](#-yaml-lint)
21+
* [Action Lint](#-action-lint)
22+
* [Markdown Lint](#-markdown-lint)
23+
* [Tests](#-tests)
24+
* [Pre-commit Hooks](#-pre-commit-hooks)
25+
* [Configured Hooks](#-configured-hooks)
26+
* [Installing Pre-commit Hooks](#-installing-pre-commit-hooks)
27+
28+
<br>
29+
30+
## 👋 Introduction
31+
32+
If you would like to contribute, please **open an issue** or a pull request. We are always looking for ways to improve the project and would love to hear your ideas.
33+
34+
The latest changes are always in **`master`** branch, so please make your Pull Request against that branch.
635

736
<br>
837

938
## 🚩 Development Requirements
1039

1140
Before you begin, you will need to set up your local development environment. Here is what you'll need:
1241

13-
- **Operating System**: macOS Monterey+, Linux, or Windows with WSL2.
14-
- **Docker**: Version 26.0.0 or newer. Installation guides:
15-
- [How To Install and Use Docker on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)
16-
- [How To Install Docker Desktop on Mac](https://docs.docker.com/desktop/install/mac-install/)
17-
- **Homebrew** (macOS only): Install via [brew.sh](https://brew.sh/).
18-
- **mkcert** Install via [brew.sh/formula/mkcert](https://formulae.brew.sh/formula/mkcert#default) or follow their instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation).
42+
* **Operating System**: macOS Monterey+, Linux, or Windows with WSL2.
43+
* **Docker**: Version 26.0.0 or newer. Installation guides:
44+
* [How To Install and Use Docker on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)
45+
* [How To Install Docker Desktop on Mac](https://docs.docker.com/desktop/install/mac-install/)
46+
* **Homebrew** (macOS only): Install via [brew.sh](https://brew.sh/).
47+
* **mkcert** Install via [brew.sh/formula/mkcert](https://formulae.brew.sh/formula/mkcert#default) or follow their instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation).
1948

2049
### → Optional Tools
2150

22-
- [Pre-commit](https://pre-commit.com) — Automates the running of git pre-commit hooks.
23-
- Installation: `brew install pre-commit` and `make hooks`
24-
- [Cz-git](https://cz-git.qbb.sh) — Commitizen adapter, that assists in formatting git commits.
25-
- Installation: `brew install czg`
51+
* [Pre-commit](https://pre-commit.com) — Automates the running of git pre-commit hooks.
52+
* Installation: `brew install pre-commit` and `make hooks`
53+
* [Cz-git](https://cz-git.qbb.sh) — Commitizen adapter, that assists in formatting git commits.
54+
* Installation: `brew install czg`
2655

2756
<br>
2857

29-
## 🛠️ Makefile
58+
## 🔧 Using the Makefile
3059

3160
This project uses a Makefile to streamline common development tasks. The Makefile includes utilities for managing Docker environments, running tests, and linting code.
3261

@@ -38,14 +67,14 @@ make help
3867

3968
### → Key Commands
4069

41-
- `make up`: Starts all services using Docker Compose.
42-
- `make up-router`: Starts only traefik router container.
43-
- `make up-dns`: Starts only dnsmasq container.
44-
- `make down`: Stops and removes all services.
45-
- `make stop`: Stops all services.
46-
- `make logs`: Displays logs for all services.
47-
- `make lint`: Executes all linting procedures for YAML, PHP, and Composer files.
48-
- `make commit`: Runs cz-git, a commitizen adapter for commit message formatting in a native environment.
70+
* `make up`: Starts all services using Docker Compose.
71+
* `make up-router`: Starts only traefik router container.
72+
* `make up-dns`: Starts only dnsmasq container.
73+
* `make down`: Stops and removes all services.
74+
* `make stop`: Stops all services.
75+
* `make logs`: Displays logs for all services.
76+
* `make lint`: Executes all linting procedures for YAML, PHP, and Composer files.
77+
* `make commit`: Runs cz-git, a commitizen adapter for commit message formatting in a native environment.
4978

5079
Refer to the output of `make help` for a comprehensive list of available commands.
5180

@@ -57,40 +86,41 @@ Refer to the output of `make help` for a comprehensive list of available command
5786
>
5887
> Please feature/fix/update... into individual PRs (not one changing everything)
5988
60-
- **Fork the Repository**: Start by forking the repository to your GitHub account.
61-
- **Create a Branch**: In your fork, create a new branch for your work. Name it appropriately based on the feature, fix, or update you're working on.
62-
- **Make Your Changes**: Implement your changes
63-
- **Run Tests**: Ensure all tests pass and the code adheres to the coding standards.
64-
- **Update Documentation**: If you've made changes that affect the project's documentation, ensure it is updated.
65-
- **Run Linters**: Ensure your code passes all linting checks using `make lint`.
66-
- **Commit Your Changes**: Use the [Conventional Commits](#-commit-message-guidelines) standard for your commit messages. You can use `make commit` to assist in creating commit messages.
67-
- **Push Your Changes**: Push your branch to your fork on GitHub.
68-
- **Open a Pull Request**: Submit a pull request to the `master` branch of the original repository. Ensure your PR is focused, addressing a single feature, fix, or improvement.
89+
* **Fork the Repository**: Start by forking the repository to your GitHub account.
90+
* **Create a Branch**: In your fork, create a new branch for your work. Name it appropriately based on the feature, fix, or update you're working on.
91+
* **Make Your Changes**: Implement your changes
92+
* **Run Tests**: Ensure all tests pass and the code adheres to the coding standards.
93+
* **Update Documentation**: If you've made changes that affect the project's documentation, ensure it is updated.
94+
* **Run Linters**: Ensure your code passes all linting checks using `make lint`.
95+
* **Commit Your Changes**: Use the [Conventional Commits](#-commit-message-guidelines) standard for your commit messages. You can use `make commit` to assist in creating commit messages.
96+
* **Push Your Changes**: Push your branch to your fork on GitHub.
97+
* **Open a Pull Request**: Submit a pull request to the `master` branch of the original repository. Ensure your PR is focused, addressing a single feature, fix, or improvement.
6998

7099
<br>
71100

72-
## ⚡️ Continuous Integration with GitHub Actions
101+
## 🔨 Continuous Integration with GitHub Actions
73102

74103
Our project employs [GitHub Actions](https://github.com/features/actions) for continuous integration, ensuring code quality and reliability. We encourage contributors to review our workflow configurations to understand the CI processes:
75104

76-
| Workflow | Description |
77-
|---------------------------------------------------------------|----------------------------------------------------|
78-
| [`apply-labels.yml`](workflows/apply-labels.yml) | Auto labels PRs based on rules. |
79-
| [`auto-merge-release.yml`](workflows/auto-merge-release.yml) | Automatically merges release PRs. |
80-
| [`coding-standards.yml`](workflows/coding-standards.yml) | Checks `yaml`, `md` and commit coding standards. |
81-
| [`create-release.yml`](workflows/create-release.yml) | Creates a new release based on tags. |
82-
| [`e2e-macos.yml`](workflows/e2e-macos.yml) | End-to-end tests on macOS. **Currently disabled** |
83-
| [`e2e-ubuntu.yml`](workflows/e2e-ubuntu.yml) | End-to-end tests on Ubuntu. **Currently disabled** |
84-
| [`shellcheck.yml`](workflows/shellcheck.yml) | Lints shell scripts. |
105+
| Workflow | Description |
106+
|--------------------------------------------------------------|----------------------------------------------------|
107+
| [`apply-labels.yml`](workflows/apply-labels.yml) | Auto labels PRs based on rules. |
108+
| [`auto-merge-release.yml`](workflows/auto-merge-release.yml) | Automatically merges release PRs. |
109+
| [`coding-standards.yml`](workflows/coding-standards.yml) | Checks `yaml`, `md` and commit coding standards. |
110+
| [`create-release.yml`](workflows/create-release.yml) | Creates a new release based on tags. |
111+
| [`e2e-macos.yml`](workflows/e2e-macos.yml) | End-to-end tests on macOS. **Currently disabled** |
112+
| [`e2e-ubuntu.yml`](workflows/e2e-ubuntu.yml) | End-to-end tests on Ubuntu. **Currently disabled** |
113+
| [`shellcheck.yml`](workflows/shellcheck.yml) | Lints shell scripts. |
114+
| [`sync-from-tpl.yml`](workflows/shellcheck.yml) | Triggered only on down-stream templates. |
85115

86116
<br>
87117

88118
## 📝 Before You Contribute
89119

90-
- **Tests**: Include tests that cover any new features or bug fixes, if applicable.
91-
- **Code Quality**: Utilize `make lint` for code style checks.
92-
- **Documentation**: Update relevant documentation to reflect your changes, ensuring other developers can understand and use your contributions effectively.
93-
- **Commits**: use Conventional Commits standard to create a commit
120+
* **Tests**: Include tests that cover any new features or bug fixes, if applicable.
121+
* **Code Quality**: Utilize `make lint` for code style checks.
122+
* **Documentation**: Update relevant documentation to reflect your changes, ensuring other developers can understand and use your contributions effectively.
123+
* **Commits**: use Conventional Commits standard to create a commit
94124

95125
<br>
96126

@@ -186,10 +216,12 @@ Pre-commit hooks are an optional but highly recommended way to automate the lint
186216

187217
Our pre-commit configuration includes several hooks:
188218

189-
- **Trailing Whitespace**: Removes unnecessary trailing spaces.
190-
- **End-of-File Fixer**: Ensures that files end with a newline.
191-
- **Check Added Large Files**: Prevents accidentally adding large files to the git repository, with a current limit set to 600 KB.
192-
- **Commitizen**: Ensures commit messages meet the conventional commit format. This hook is triggered at the commit message stage.
219+
* **Trailing Whitespace**: Removes unnecessary trailing spaces.
220+
* **End-of-File Fixer**: Ensures that files end with a newline.
221+
* **Check Added Large Files**: Prevents accidentally adding large files to the git repository, with a current limit set to 600 KB.
222+
* **Commitizen**: Ensures commit messages meet the conventional commit format. This hook is triggered at the commit message stage.
223+
224+
* **Markdown Lint:** Enforces coding standards in Markdown files.
193225

194226
### → Installing Pre-commit Hooks
195227

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ It includes a set of docker-compose files and [Træfik](https://traefik.io/) con
3131

3232
- [Key Features](#-key-features)
3333
- [Purpose](#-purpose)
34+
- [Benefits for Team](#-benefits-for-team)
3435
- [Requirements](#-requirements)
3536
- [Quick Start Guide (macOS)](#-quick-start-guide-macos)
3637
- [Quick Start Guide (Linux)](#-quick-start-guide-linux)

0 commit comments

Comments
 (0)