You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-46Lines changed: 47 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,7 @@
2
2
3
3
Reusable GitHub Actions workflow for testing phpBB extensions across multiple environments.
4
4
5
-
This repository contains a pre-configured test workflow designed for phpBB extension developers. It runs your extension's tests using various PHP versions and database systems, including **MySQL**, **PostgreSQL**, **SQLite**, and **Microsoft SQL Server**.
This repository provides a reusable GitHub Actions workflow designed for phpBB extension developers. It supports testing across PHP 8.x and database engines including MySQL, PostgreSQL, SQLite, and Microsoft SQL Server. Optional checks include PHP CodeSniffer, Extension Pre Validator (EPV), executable file detection, image ICC profile removal, and code coverage reporting via Codecov.
26
6
27
7
On GitHub.com, go to your extension's repository, click **Add file → Create new file**, name it `.github/workflows/tests.yml`, add the workflow content shown below, and commit the file. Make sure to replace `acme/demo` with your actual extension vendor/package name, and optionally you may adjust any of the branch names and other checks.
28
8
@@ -51,7 +31,7 @@ jobs:
51
31
EXTNAME: acme/demo # Your extension vendor/package name
52
32
```
53
33
54
-
### Branches
34
+
## Branches
55
35
56
36
Use the test-framework branch that matches the phpBB version you're developing for:
57
37
@@ -64,12 +44,12 @@ Use the test-framework branch that matches the phpBB version you're developing f
- 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**.
70
50
- Tests must be defined in your repository using PHPUnit.
71
51
72
-
## Configuration Options
52
+
# Configuration Options
73
53
74
54
You can fine-tune this workflow with several optional arguments in the `with` section:
75
55
@@ -151,9 +131,9 @@ call-tests:
151
131
CODECOV: 0
152
132
```
153
133
154
-
## Configuration Examples
134
+
# Configuration Examples
155
135
156
-
### Test an extension with phpBB 3.3.x
136
+
## Test an extension with phpBB 3.3.x
157
137
158
138
```yaml
159
139
call-tests:
@@ -163,7 +143,7 @@ call-tests:
163
143
EXTNAME: acme/demo
164
144
```
165
145
166
-
### Test an extension with phpBB's master-dev version
146
+
## Test an extension with phpBB's master-dev version
167
147
168
148
```yaml
169
149
call-tests:
@@ -173,7 +153,7 @@ call-tests:
173
153
EXTNAME: acme/demo
174
154
```
175
155
176
-
### Test an extension but skip the PostgreSQL on Linux and Windows tests
156
+
## Test an extension but skip the PostgreSQL on Linux and Windows tests
177
157
178
158
```yaml
179
159
call-tests:
@@ -185,7 +165,7 @@ call-tests:
185
165
RUN_WINDOWS_JOBS: 0
186
166
```
187
167
188
-
### Test an extension that has no PHPUnit tests (basic checks only)
168
+
## Test an extension that has no PHPUnit tests (basic checks only)
189
169
190
170
```yaml
191
171
call-tests:
@@ -199,7 +179,7 @@ call-tests:
199
179
RUN_WINDOWS_JOBS: 0
200
180
```
201
181
202
-
### Test an extension that has no Functional tests
> - Go to your [Codecov account settings](https://app.codecov.io/account/token)
240
+
> - Copy the token
241
+
>
242
+
> Then, in your GitHub repository:
243
+
>
244
+
> - Navigate to **Settings → Secrets and variables → Actions**
245
+
> - Click **"New repository secret"**
246
+
> - Name it `CODECOV_TOKEN` and paste your token value
247
+
>
248
+
> 💡 You can view your coverage reports and badges by visiting your extension's page on [Codecov.io](https://codecov.io).
249
+
250
+
## When the configuration options aren’t enough
253
251
254
-
Most public repositories do **not** require a token.
255
-
For private repositories or certain CI setups, you may need a global **Codecov token**:
252
+
If testing your extension requires more flexibility than the provided configuration options allow, you have two choices:
256
253
257
-
- Visit [https://codecov.io](https://codecov.io)
258
-
- Log in with your **GitHub** account
259
-
- Go to your [Codecov account settings](https://app.codecov.io/account/token)
260
-
- Copy the token
254
+
**Open an Issue** – If something is missing or could be improved, feel free to [open an issue](https://github.com/phpbb-extensions/test-framework/issues). Suggestions and feedback are welcome and may help improve the framework for everyone.
261
255
262
-
Then, in your GitHub repository:
256
+
**Create Your Own Custom Version** – For highly specific needs, you can create your own version of this framework by using it as a template. Just click **Use this template → Create a new repository** to get started. Once your custom repository is set up, you can modify the workflow as needed. Then, reference your version of the framework from your extension’s test workflow like so:
263
257
264
-
- Navigate to **Settings → Secrets and variables → Actions**
265
-
- Click **"New repository secret"**
266
-
- Name it `CODECOV_TOKEN` and paste your token value
> 💡 You can view your coverage reports and badges by visiting your extension's page on [Codecov.io](https://codecov.io).
267
+
# Contributing
268
+
269
+
Issues and pull requests are welcome! If you have suggestions for improvement, feel free to [open an issue](https://github.com/phpbb-extensions/test-framework/issues).
0 commit comments