Skip to content

Commit 40c16d2

Browse files
authored
Merge pull request #54 from iMattPro/mst-update
Merge 33x into master
2 parents b39b011 + 18e6421 commit 40c16d2

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ Additional checks include PHP CodeSniffer, Extension Pre Validator (EPV), execut
99
[![Build](https://github.com/phpbb-extensions/test-framework/actions/workflows/validate_workflows.yml/badge.svg)](https://github.com/phpbb-extensions/test-framework/actions/workflows/validate_workflows.yml)
1010
[![Tests](https://github.com/phpbb/phpbb-ext-acme-demo/actions/workflows/tests.yml/badge.svg)](https://github.com/phpbb/phpbb-ext-acme-demo/actions/workflows/tests.yml)
1111
<br clear="both"/>
12-
13-
# How to Use
12+
13+
## How to Use
1414

1515
Your extension's package contents must be located at the root level of the repository. That is, your extension's `composer.json` must be in the **root of the repository**, not inside a subdirectory within the repository.
1616

17-
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.
17+
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.
18+
19+
> ‼️ Make sure to replace `acme/demo` with your actual extension vendor/package name, and adjust the branch names as needed.
1820
1921
```yaml
2022
name: Tests
@@ -40,20 +42,20 @@ jobs:
4042
EXTNAME: acme/demo # Your extension vendor/package name (required)
4143
```
4244
43-
## phpBB Branches
45+
### phpBB Branches
4446
4547
Use the test-framework branch that matches the phpBB version you're developing for:
4648
4749
- `3.3.x`: Targets the phpBB 3.3.x release line.
4850
- `master`: Targets the latest development version of phpBB (`master` branch).
4951

5052
> ‼️ Whichever branch of this framework you choose, be sure it is appended to the `uses:` line after the `@` symbol. For example, if you're targeting the `master` branch:
51-
>
53+
>
5254
> ```yaml
5355
> uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@master
5456
> ```
5557

56-
# Configuration Options
58+
## Configuration Options
5759

5860
You can fine-tune this workflow with several optional arguments in the `with` section:
5961

@@ -110,7 +112,7 @@ call-tests:
110112
# Default: 1
111113
RUN_FUNCTIONAL_TESTS: 1
112114
113-
# Install NPM dependencies (if your extension relies on them)? 1 (yes) or 0 (no)
115+
# Install npm dependencies (if your extension relies on them)? 1 (yes) or 0 (no)
114116
# Default: 0
115117
RUN_NPM_INSTALL: 0
116118
@@ -135,9 +137,9 @@ call-tests:
135137
CODECOV: 0
136138
```
137139

138-
# Configuration Examples
140+
## Configuration Examples
139141

140-
## Test an extension with phpBB 3.3.x
142+
### Test an extension with phpBB 3.3.x
141143

142144
```yaml
143145
call-tests:
@@ -147,7 +149,7 @@ call-tests:
147149
EXTNAME: acme/demo
148150
```
149151

150-
## Test an extension with phpBB's master-dev version
152+
### Test an extension with phpBB's master-dev version
151153

152154
```yaml
153155
call-tests:
@@ -157,7 +159,7 @@ call-tests:
157159
EXTNAME: acme/demo
158160
```
159161

160-
## Test an extension but skip the PostgreSQL on Linux and Windows tests
162+
### Test an extension but skip the PostgreSQL on Linux and Windows tests
161163

162164
```yaml
163165
call-tests:
@@ -169,7 +171,7 @@ call-tests:
169171
RUN_WINDOWS_JOBS: 0
170172
```
171173

172-
## Test an extension that has no PHPUnit tests (basic checks only)
174+
### Test an extension that has no PHPUnit tests (basic checks only)
173175

174176
```yaml
175177
call-tests:
@@ -183,7 +185,7 @@ call-tests:
183185
RUN_WINDOWS_JOBS: 0
184186
```
185187

186-
## Test an extension that has no Functional tests
188+
### Test an extension that has no Functional tests
187189

188190
```yaml
189191
call-tests:
@@ -194,7 +196,7 @@ call-tests:
194196
RUN_FUNCTIONAL_TESTS: 0
195197
```
196198

197-
## Test an extension that only supports PHP 8+
199+
### Test an extension that only supports PHP 8+
198200

199201
```yaml
200202
call-tests:
@@ -206,7 +208,7 @@ call-tests:
206208
PHP_VERSION_MATRIX: '["8.0", "8.1", "8.2", "8.3", "8.4"]'
207209
```
208210

209-
## Test an extension that has composer and NPM dependencies
211+
### Test an extension that has composer and npm dependencies
210212

211213
```yaml
212214
call-tests:
@@ -218,7 +220,7 @@ call-tests:
218220
RUN_COMPOSER_INSTALL: 1
219221
```
220222

221-
## Test an extension + generate a code coverage report
223+
### Test an extension + generate a code coverage report
222224

223225
This test framework supports code coverage reporting through [Codecov.io](https://codecov.io).
224226

@@ -242,13 +244,13 @@ call-tests:
242244
> - Log in with your **GitHub** account
243245
> - Go to your [Codecov account settings](https://app.codecov.io/account/token)
244246
> - Copy the token
245-
>
247+
>
246248
> Then, in your GitHub repository:
247-
>
249+
>
248250
> - Navigate to **Settings → Secrets and variables → Actions**
249251
> - Click **"New repository secret"**
250252
> - Name it `CODECOV_TOKEN` and paste your token value
251-
>
253+
>
252254
> 💡 You can view your coverage reports and badges by visiting your extension's page on [Codecov.io](https://codecov.io).
253255

254256
## When the configuration options aren’t enough
@@ -278,10 +280,10 @@ Display a status badge in your repository to indicate the status of your test re
278280
[![Tests](https://github.com/your-org/your-repo/actions/workflows/tests.yml/badge.svg)](https://github.com/your-org/your-repo/actions/workflows/tests.yml)
279281
```
280282

281-
# Contributing
283+
## Contributing
282284

283285
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).
284286

285-
# License
287+
## License
286288

287289
[GNU General Public License v2](https://opensource.org/licenses/GPL-2.0)

0 commit comments

Comments
 (0)