|
1 | 1 | name: Tests |
2 | 2 |
|
3 | | -{% if COMPONENT.githubactions_custom %} |
| 3 | +{% if COMPONENT.githubactions %} |
| 4 | +# For most extensions, this workflow should not need changing; |
| 5 | +# simply commit it to your repository. |
| 6 | +# |
| 7 | +# See the README for full details and configuration instructions: |
| 8 | +# - https://github.com/phpbb-extensions/test-framework |
| 9 | +# |
| 10 | +on: |
| 11 | + push: |
| 12 | + # Run tests when commits are pushed to these branches in your repo, |
| 13 | + # or remove this branches section to run tests on all your branches |
| 14 | + branches: |
| 15 | + - main # Main production branch |
| 16 | + - master # Legacy or alternative main branch |
| 17 | + - dev/* # Any feature branches under "dev/", e.g., dev/new-feature |
| 18 | + - release-* # Any release branches under "release-", e.g., release-1.0.0 |
| 19 | + |
| 20 | + pull_request: |
| 21 | + # Run tests when pull requests are made on these branches in your repo, |
| 22 | + # or remove this branches section to run tests on all your branches |
| 23 | + branches: |
| 24 | + - main |
| 25 | + - master |
| 26 | + - dev/* |
| 27 | + |
| 28 | +jobs: |
| 29 | + call-tests: |
| 30 | + name: Extension tests |
| 31 | + # Set the phpBB branch to test your extension with after the @ symbol |
| 32 | + # - 3.3.x: Targets the phpBB 3.3.x release line |
| 33 | + # - master: Targets the latest development version of phpBB (master branch) |
| 34 | + uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@{{ skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "4.0", "<") ? '3.3.x' : 'master' }} |
| 35 | + with: |
| 36 | + # Your extension vendor/package name |
| 37 | + EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} |
| 38 | +{% elseif COMPONENT.githubactions_custom %} |
4 | 39 | env: |
5 | 40 | EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} # Your extension vendor/package name |
6 | 41 | SNIFF: 1 # Run code sniffer on your code? 1 or 0 |
@@ -425,39 +460,4 @@ jobs: |
425 | 460 | run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php |
426 | 461 | working-directory: ./phpBB3 |
427 | 462 | # END Other Tests Job |
428 | | -{% else %} |
429 | | -# For most extensions, this workflow should not need changing; |
430 | | -# simply commit it to your repository. |
431 | | -# |
432 | | -# See the README for full details and configuration instructions: |
433 | | -# - https://github.com/phpbb-extensions/test-framework |
434 | | -# |
435 | | -on: |
436 | | - push: |
437 | | - # Run tests when commits are pushed to these branches in your repo, |
438 | | - # or remove this branches section to run tests on all your branches |
439 | | - branches: |
440 | | - - main # Main production branch |
441 | | - - master # Legacy or alternative main branch |
442 | | - - dev/* # Any feature branches under "dev/", e.g., dev/new-feature |
443 | | - - release-* # Any release branches under "release-", e.g., release-1.0.0 |
444 | | - |
445 | | - pull_request: |
446 | | - # Run tests when pull requests are made on these branches in your repo, |
447 | | - # or remove this branches section to run tests on all your branches |
448 | | - branches: |
449 | | - - main |
450 | | - - master |
451 | | - - dev/* |
452 | | - |
453 | | -jobs: |
454 | | - call-tests: |
455 | | - name: Extension tests |
456 | | - # Set the phpBB branch to test your extension with after the @ symbol |
457 | | - # - 3.3.x: Targets the phpBB 3.3.x release line |
458 | | - # - master: Targets the latest development version of phpBB (master branch) |
459 | | - uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@{{ skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "4.0", "<") ? '3.3.x' : 'master' }} |
460 | | - with: |
461 | | - # Your extension vendor/package name |
462 | | - EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} |
463 | 463 | {% endif %} |
0 commit comments