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
+48-45Lines changed: 48 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,9 @@
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**.
5
+
This repository provides a reusable GitHub Actions workflow designed for phpBB extension developers. It supports testing across PHP versions 7.2 through 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.
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
10
@@ -51,7 +33,7 @@ jobs:
51
33
EXTNAME: acme/demo # Your extension vendor/package name
52
34
```
53
35
54
-
### Branches
36
+
## Branches
55
37
56
38
Use the test-framework branch that matches the phpBB version you're developing for:
57
39
@@ -64,12 +46,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
52
- Tests must be defined in your repository using PHPUnit.
71
53
72
-
## Configuration Options
54
+
# Configuration Options
73
55
74
56
You can fine-tune this workflow with several optional arguments in the `with` section:
75
57
@@ -151,9 +133,9 @@ call-tests:
151
133
CODECOV: 0
152
134
```
153
135
154
-
## Configuration Examples
136
+
# Configuration Examples
155
137
156
-
### Test an extension with phpBB 3.3.x
138
+
## Test an extension with phpBB 3.3.x
157
139
158
140
```yaml
159
141
call-tests:
@@ -163,7 +145,7 @@ call-tests:
163
145
EXTNAME: acme/demo
164
146
```
165
147
166
-
### Test an extension with phpBB's master-dev version
148
+
## Test an extension with phpBB's master-dev version
167
149
168
150
```yaml
169
151
call-tests:
@@ -173,7 +155,7 @@ call-tests:
173
155
EXTNAME: acme/demo
174
156
```
175
157
176
-
### Test an extension but skip the PostgreSQL on Linux and Windows tests
158
+
## Test an extension but skip the PostgreSQL on Linux and Windows tests
177
159
178
160
```yaml
179
161
call-tests:
@@ -185,7 +167,7 @@ call-tests:
185
167
RUN_WINDOWS_JOBS: 0
186
168
```
187
169
188
-
### Test an extension that has no PHPUnit tests (basic checks only)
170
+
## Test an extension that has no PHPUnit tests (basic checks only)
189
171
190
172
```yaml
191
173
call-tests:
@@ -199,7 +181,7 @@ call-tests:
199
181
RUN_WINDOWS_JOBS: 0
200
182
```
201
183
202
-
### Test an extension that has no Functional tests
> - Go to your [Codecov account settings](https://app.codecov.io/account/token)
242
+
> - Copy the token
243
+
>
244
+
> Then, in your GitHub repository:
245
+
>
246
+
> - Navigate to **Settings → Secrets and variables → Actions**
247
+
> - Click **"New repository secret"**
248
+
> - Name it `CODECOV_TOKEN` and paste your token value
249
+
>
250
+
> 💡 You can view your coverage reports and badges by visiting your extension's page on [Codecov.io](https://codecov.io).
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
+
## When the configuration options aren’t enough
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
+
If testing your extension requires more flexibility than the provided configuration options allow, you have two choices:
261
255
262
-
Then, in your GitHub repository:
256
+
**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.
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
258
+
**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:
267
259
268
-
> 💡 You can view your coverage reports and badges by visiting your extension's page on [Codecov.io](https://codecov.io).
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