Skip to content

Commit 247bcb1

Browse files
committed
Make the resuable framework the dominant/overriding option
1 parent ad404b5 commit 247bcb1

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

language/en/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_EXPLAIN' => 'Creates a GitHub Actions workflow that uses a reusable, phpBB-maintained framework to run PHPUnit tests on your repository. The workflow file is saved in .github/workflows and runs automatically on each commit and pull request.',
131131
'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM' => 'Create a standalone GitHub Actions workflow [Deprecated: not recommended unless you plan to modify jobs or steps]',
132132
'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_UI' => 'GitHub Actions Workflow (Standalone – Deprecated)',
133-
'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_EXPLAIN' => 'Deprecated: Creates a fully standalone workflow to run PHPUnit tests without using the shared phpBB framework. This overrides the reusable workflow and is no longer recommended. The file is saved in .github/workflows and runs on each commit and pull request.',
133+
'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_EXPLAIN' => 'Deprecated: Creates a standalone workflow for PHPUnit tests without the shared phpBB framework. Will be overridden if the reusable workflow is also selected. Saved in .github/workflows and runs on each commit and pull request.',
134134
'SKELETON_QUESTION_COMPONENT_BUILD' => 'Create a sample build script for phing',
135135
'SKELETON_QUESTION_COMPONENT_BUILD_UI' => 'Build script (phing)',
136136
'SKELETON_QUESTION_COMPONENT_BUILD_EXPLAIN' => 'A phing build script is generated for your extension which can be used to generate build packages to help simplify the release or deployment processes.',

skeleton/.github/workflows/tests.yml.twig

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
name: Tests
22

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 %}
439
env:
540
EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} # Your extension vendor/package name
641
SNIFF: 1 # Run code sniffer on your code? 1 or 0
@@ -425,39 +460,4 @@ jobs:
425460
run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
426461
working-directory: ./phpBB3
427462
# 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 }}
463463
{% endif %}

0 commit comments

Comments
 (0)