Skip to content

Commit 3f283c4

Browse files
committed
Refactor readme
1 parent 2b34299 commit 3f283c4

1 file changed

Lines changed: 25 additions & 42 deletions

File tree

README.md

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ This repository contains a pre-configured test workflow designed for phpBB exten
66

77
## Table of Contents
88

9-
- [✨ Features](#-features)
10-
- [🚀 How to Use](#-how-to-use)
11-
- [🧪 Branches](#-branches)
12-
- [✅ Requirements](#-requirements)
13-
- [⏭️ Skipping Jobs](#️-skipping-jobs)
14-
- [📦 Dependency Installation](#-dependency-installation)
15-
- [⚙️ Customising the PHP Test Suite](#️-customising-the-php-test-suite)
16-
- [📊 Code Coverage with Codecov](#-code-coverage-with-codecov)
17-
- [📄 License](#-license)
9+
-[Features](#-features)
10+
- 🚀 [How to Use](#-how-to-use)
11+
-[Requirements](#-requirements)
12+
- 🛠 [Advanced Configuration Options](#-advanced-configuration-options)
13+
- 📊 [Code Coverage with Codecov](#-code-coverage-with-codecov)
1814

1915
## ✨ Features
2016

@@ -63,7 +59,7 @@ jobs:
6359
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Do not edit this
6460
```
6561
66-
## 🧪 Branches
62+
### Branches
6763
6864
Use the branch that matches the phpBB version you're developing for.
6965
@@ -75,65 +71,53 @@ Use the branch that matches the phpBB version you're developing for.
7571
- Your extension's package contents must be located at the root level of the repository. That is, the repository **must directly represent the package**, with all relevant files such as `composer.json`, `README`, `LICENSE`, etc. placed directly in the **root of the repository**, **not inside a subdirectory within the repository**. See any of phpbb-extension's official extension repositories as an example.
7672
- Tests must be defined in your repository using PHPUnit.
7773

78-
# Advanced Configuration Options
74+
## 🛠 Advanced Configuration Options
7975

80-
The following sections provide instruction for advanced users who are not able to use the default workflow out-of-the-box configuration. If your tests are failing with the default workflow, it may be because you need to change the PHP versions or skip certain jobs.
76+
You can fine-tune this workflow with several optional arguments:
8177

82-
## ⏭️ Skipping Jobs
78+
## 🔃 Selectively Run Job Groups
8379

84-
This test framework runs four primary job groups:
85-
1. Basic checks - These are the code sniffer, icc profile sniffer, executable file and EPV checks.
86-
2. MySQL - Tests using MySQL and MariaDB database structures.
87-
3. PostgreSQL - Tests using PostgreSQL database structures.
88-
4. MSSQL - Tests using MSSQL and SQLite3 database structures.
89-
90-
You can skip any of these job groups—such as if your extension does not support MSSQL—by setting the appropriate optional arguments when using this workflow:
80+
By default, all test job groups run. You can skip any by setting their arguments to 0:
9181

9282
```yaml
9383
with:
9484
...
95-
RUN_BASIC_JOBS: 1 # Set to 0 to skip; otherwise set to 1 or omit
96-
RUN_MYSQL_JOBS: 1 # Set to 0 to skip; otherwise set to 1 or omit
97-
RUN_POSTGRESQL_JOBS: 1 # Set to 0 to skip; otherwise set to 1 or omit
98-
RUN_MSSQL_JOBS: 0 # Set to 0 to skip; otherwise set to 1 or omit
99-
...
85+
RUN_BASIC_JOBS: 0 # Skip checks like sniffer, EPV, etc.
86+
RUN_MYSQL_JOBS: 0 # Skip MySQL/MariaDB tests
87+
RUN_POSTGRESQL_JOBS: 0 # Skip PostgreSQL tests
88+
RUN_MSSQL_JOBS: 0 # Skip MSSQL and SQLite3 tests
10089
```
10190

102-
> Note: If you do not need to skip any jobs, you don’t need to include these arguments at all. For example, omitting `RUN_BASIC_JOBS` is equivalent to setting it to 1. You only need to define these arguments if you want to disable a job by setting its value to 0.
91+
> 💡 Omit these inputs or set them to 1 to enable each group (default behavior).
10392

104-
## 📦 Dependency Installation
93+
## 📦 Install Dependencies
10594

106-
If your extension requires **NPM** or **Composer** dependencies, you can enable automatic installation by setting the following arguments:
95+
If your extension relies on NPM or Composer dependencies, enable automated installs:
10796

10897
```yaml
10998
with:
11099
...
111-
RUN_NPM_INSTALL: 1 # Set to 1 to run `npm ci`; otherwise set to 0 or omit
112-
RUN_COMPOSER_INSTALL: 1 # Set to 1 to run `composer install`; otherwise set to 0 or omit
113-
...
100+
RUN_NPM_INSTALL: 1 # Run `npm ci`
101+
RUN_COMPOSER_INSTALL: 1 # Run `composer install`
114102
```
115103
116-
> 💡 If you don't need either, you can omit these arguments entirely.
104+
> 💡 Omit if not needed.
117105
118-
## ⚙️ Customising the PHP Test Suite
106+
## 🐘 Customise PHP Versions
119107
120-
By default, this framework tests your extension against the full range of PHP versions supported by phpBB (7.2 through 8.4). You can override this by specifying the following optional inputs:
108+
To override the default PHP versions tested (7.2 through 8.4), use:
121109
122110
```yaml
123111
with:
124112
...
125113
PRIMARY_PHP_VERSION: '8.1'
126114
PHP_VERSION_MATRIX: '["8.0", "8.1", "8.2", "8.3", "8.4"]'
127-
...
128115
```
129116
130-
- `PRIMARY_PHP_VERSION`: The PHP version used for **all** jobs, including code checks and database tests. Defaults to `7.2`.
131-
- `PHP_VERSION_MATRIX`: A JSON array of PHP versions to test against during **MySQL** and **PostgreSQL** jobs. Defaults to:
132-
```json
133-
["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
134-
```
117+
- `PRIMARY_PHP_VERSION`: PHP version used for all jobs, including checks and MSSQL. Default is 7.2.
118+
- `PHP_VERSION_MATRIX`: List of all PHP versions you want tested (in MySQL and PostgreSQL jobs).
135119

136-
> 💡 Use these options if your extension supports only a specific set of PHP versions, or if you want to test against a narrower or newer PHP version range.
120+
> 💡 Use this if your extension supports a limited or newer PHP version range. Omit if not needed.
137121

138122
## 📊 Code Coverage with Codecov
139123

@@ -158,7 +142,6 @@ Ensure `CODECOV: 1` is set in your workflow call:
158142
with:
159143
...
160144
CODECOV: 1
161-
...
162145
```
163146

164147
### 3. Get Your Codecov Token (if required)

0 commit comments

Comments
 (0)