diff --git a/language/en/common.php b/language/en/common.php index 4744f0b..e38a03c 100644 --- a/language/en/common.php +++ b/language/en/common.php @@ -121,11 +121,11 @@ 'SKELETON_QUESTION_COMPONENT_TESTS_UI' => 'Tests (PHPUnit)', 'SKELETON_QUESTION_COMPONENT_TESTS_EXPLAIN' => 'Unit tests can test an extension to verify that specific portions of its source code work properly. This helps ensure basic code integrity and prevents regressions as an extension is being developed and debugged.', 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS' => 'Create a GitHub Actions workflow to run tests in your repository?', - 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_UI' => 'Github Actions workflow', - 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_EXPLAIN' => 'Creates a GitHub Actions workflow to run PHPUnit tests on your repository using a framework maintained by phpBB. The workflow YML file will be placed in the .github/workflows folder and will run tests automatically on each commit and pull request.', + 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_UI' => 'GitHub Actions Workflow (Reusable – Recommended)', + '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.', 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM' => 'Create a fully customisable GitHub Actions workflow? (Select this if you plan to modify jobs or steps.)', - 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_UI' => 'Github Actions custom workflow', - 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_EXPLAIN' => 'Creates a customisable GitHub Actions workflow to run PHPUnit tests on your repository. This workflow is flexible to fit your specific testing needs and will be saved in the .github/workflows folder, triggered by each commit and pull request. Choosing this will override the non-customisable workflow.', + 'SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_CUSTOM_UI' => 'GitHub Actions Workflow (Standalone – Deprecated)', + '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.', 'SKELETON_QUESTION_COMPONENT_BUILD' => 'Create a sample build script for phing?', 'SKELETON_QUESTION_COMPONENT_BUILD_UI' => 'Build script (phing)', '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.', diff --git a/skeleton/.github/workflows/tests.yml.twig b/skeleton/.github/workflows/tests.yml.twig index 4644aa9..e984322 100644 --- a/skeleton/.github/workflows/tests.yml.twig +++ b/skeleton/.github/workflows/tests.yml.twig @@ -426,26 +426,38 @@ jobs: working-directory: ./phpBB3 # END Other Tests Job {% else %} +# For most extensions, this workflow should not need changing; +# simply commit it to your repository. +# +# See the README for full details and configuration instructions: +# - https://github.com/phpbb-extensions/test-framework +# on: - push: - branches: # Run tests when commits are pushed to these branches in your repo - - main - - master - - develop - - dev/* - pull_request: # Run tests when pull requests are made on these branches in your repo - branches: - - main - - master - - develop - - dev/* + push: + # Run tests when commits are pushed to these branches in your repo, + # or remove this branches section to run tests on all your branches + branches: + - main # Main production branch + - master # Legacy or alternative main branch + - dev/* # Any feature branches under "dev/", e.g., dev/new-feature + - release-* # Any release branches under "release-", e.g., release-1.0.0 + + pull_request: + # Run tests when pull requests are made on these branches in your repo, + # or remove this branches section to run tests on all your branches + branches: + - main + - master + - dev/* jobs: - call-tests: - name: Extension tests - uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x - with: - EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} # Your extension vendor/package name - -# See the README for full details and setup instructions: https://github.com/phpbb-extensions/test-framework + call-tests: + name: Extension tests + # Set the phpBB branch to test your extension with after the @ symbol + # - 3.3.x: Targets the phpBB 3.3.x release line + # - master: Targets the latest development version of phpBB (master branch) + uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@{{ skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "4.0", "<") ? '3.3.x' : 'master' }} + with: + # Your extension vendor/package name + EXTNAME: {{ EXTENSION.vendor_name }}/{{ EXTENSION.extension_name }} {% endif %}