|
1 | | -name: Actions CI |
2 | | - |
3 | | -env: |
4 | | - EXTNAME: dark1/memberavatarstatus # Your extension vendor/package name |
5 | | - SNIFF: 1 # Run code sniffer on your code? 1 or 0 |
6 | | - IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 |
7 | | - EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 |
8 | | - EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 |
9 | | - PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on |
| 1 | +name: Tests |
10 | 2 |
|
11 | 3 | on: |
12 | | - push: |
13 | | - branches: # Run tests when commits are pushed to these branches in your repo |
14 | | - - master |
15 | | - pull_request: # Run tests when pull requests are made on these branches in your repo |
16 | | - branches: |
17 | | - - master |
| 4 | + push: # Run tests when commits are pushed to these branches in your repo, |
| 5 | + branches: # ... or remove this branches section to run tests on all your branches |
| 6 | + - main # Main production branch |
| 7 | + - master # Legacy or alternative main branch |
| 8 | + - dev/* # Any feature branches under "dev/", e.g., dev/new-feature |
| 9 | + |
| 10 | + pull_request: # Run tests when pull requests are made on these branches in your repo, |
| 11 | + branches: # ... or remove this branches section to run tests on all your branches |
| 12 | + - main |
| 13 | + - master |
| 14 | + - dev/* |
18 | 15 |
|
19 | 16 | jobs: |
20 | | - # START Basic Checks Job (EPV, code sniffer, images check, etc.) |
21 | | - basic-checks: |
22 | | - if: (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')) |
23 | | - runs-on: ubuntu-18.04 |
24 | | - strategy: |
25 | | - matrix: |
26 | | - include: |
27 | | - - php: '7.1' |
28 | | - db: "none" |
29 | | - NOTESTS: 1 |
30 | | - |
31 | | - name: PHP ${{ matrix.php }} - ${{ matrix.db }} |
32 | | - |
33 | | - steps: |
34 | | - - name: Checkout phpBB |
35 | | - uses: actions/checkout@v2 |
36 | | - with: |
37 | | - repository: phpbb/phpbb |
38 | | - ref: ${{ env.PHPBB_BRANCH }} |
39 | | - path: phpBB3 |
40 | | - |
41 | | - - name: Checkout extension |
42 | | - uses: actions/checkout@v2 |
43 | | - with: |
44 | | - path: phpBB3/phpBB/ext/${{ env.EXTNAME }}/${{ env.EXTNAME }} |
45 | | - |
46 | | - - name: Setup PHP |
47 | | - uses: shivammathur/setup-php@v2 |
48 | | - with: |
49 | | - php-version: ${{ matrix.php }} |
50 | | - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap |
51 | | - coverage: none |
52 | | - |
53 | | - - name: Setup environment for phpBB |
54 | | - env: |
55 | | - DB: ${{ matrix.db }} |
56 | | - PHP_VERSION: ${{ matrix.php }} |
57 | | - NOTESTS: '1' |
58 | | - run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS |
59 | | - working-directory: ./phpBB3 |
60 | | - |
61 | | - - name: Setup EPV |
62 | | - if: ${{ env.EPV != 0 }} |
63 | | - run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs |
64 | | - working-directory: ./phpBB3/phpBB |
65 | | - |
66 | | - - name: Run code sniffer |
67 | | - if: ${{ env.SNIFF != 0 }} |
68 | | - env: |
69 | | - NOTESTS: '1' |
70 | | - run: .github/ext-sniff.sh $EXTNAME/$EXTNAME $NOTESTS |
71 | | - working-directory: ./phpBB3 |
72 | | - |
73 | | - - name: Check image ICC profiles |
74 | | - if: ${{ env.IMAGE_ICC != 0 }} |
75 | | - run: .github/check-image-icc-profiles.sh |
76 | | - working-directory: ./phpBB3 |
77 | | - |
78 | | - - name: Check executable files |
79 | | - if: ${{ env.EXECUTABLE_FILES != 0 }} |
80 | | - run: .github/ext-check-executable-files.sh ./ $EXTNAME/$EXTNAME |
81 | | - working-directory: ./phpBB3 |
| 17 | + call-tests: |
82 | 18 |
|
83 | | - - name: Run EPV |
84 | | - if: ${{ env.EPV != 0 }} |
85 | | - run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/" --debug |
86 | | - working-directory: ./phpBB3 |
87 | | - # END Basic Checks Job |
| 19 | + name: Extension tests |
| 20 | + uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x |
| 21 | + with: |
| 22 | + EXTNAME: dark1/memberavatarstatus # Your extension vendor/package name (required) |
| 23 | + |
| 24 | + # The phpBB repository's branch to use when running tests. |
| 25 | + # Default is '3.3.x', which this framework is designed for. |
| 26 | + # If using a different branch, ensure it's compatible with 3.3.x. |
| 27 | + # To test with phpBB's master branch, refer to the phpBB Branches section of this README. |
| 28 | + # Default: '3.3.x' |
| 29 | + PHPBB_BRANCH: '3.3.x' |
| 30 | + |
| 31 | + # Run phpBB's EPV (Extension Pre Validator)? 1 (yes) or 0 (no) |
| 32 | + # Default: 1 |
| 33 | + EPV: 1 |
| 34 | + |
| 35 | + # Check for files with executable permissions? 1 (yes) or 0 (no) |
| 36 | + # Default: 1 |
| 37 | + EXECUTABLE_FILES: 1 |
| 38 | + |
| 39 | + # Remove embedded ICC profiles from images? 1 (yes) or 0 (no) |
| 40 | + # Default: 1 |
| 41 | + IMAGE_ICC: 1 |
| 42 | + |
| 43 | + # Run CodeSniffer to detect PHP code style issues? 1 (yes) or 0 (no) |
| 44 | + # Default: 1 |
| 45 | + SNIFF: 1 |
| 46 | + |
| 47 | + # Run MySQL/MariaDB tests? 1 (yes) or 0 (no) |
| 48 | + # Default: 1 |
| 49 | + RUN_MYSQL_JOBS: 0 |
| 50 | + |
| 51 | + # Run PostgreSQL tests? 1 (yes) or 0 (no) |
| 52 | + # Default: 1 |
| 53 | + RUN_PGSQL_JOBS: 0 |
| 54 | + |
| 55 | + # Run MSSQL and SQLite3 tests? 1 (yes) or 0 (no) |
| 56 | + # Default: 1 |
| 57 | + RUN_MSSQL_JOBS: 0 |
| 58 | + |
| 59 | + # Run Windows IIS & PostgreSQL tests? 1 (yes) or 0 (no) |
| 60 | + # Default: 1 |
| 61 | + RUN_WINDOWS_JOBS: 0 |
| 62 | + |
| 63 | + # Run functional tests if you have them? 1 (yes) or 0 (no) |
| 64 | + # Default: 1 |
| 65 | + RUN_FUNCTIONAL_TESTS: 0 |
| 66 | + |
| 67 | + # Install npm dependencies (if your extension relies on them)? 1 (yes) or 0 (no) |
| 68 | + # Default: 0 |
| 69 | + RUN_NPM_INSTALL: 0 |
| 70 | + |
| 71 | + # Install Composer dependencies (if your extension relies on them)? 1 (yes) or 0 (no) |
| 72 | + # Default: 0 |
| 73 | + RUN_COMPOSER_INSTALL: 0 |
| 74 | + |
| 75 | + # CUSTOMISE PHP VERSIONS |
| 76 | + # To override the default PHP versions tested (7.2 through 8.4): |
| 77 | + |
| 78 | + # Preferred PHP version used for all test jobs. |
| 79 | + # Default: '7.2' |
| 80 | + PRIMARY_PHP_VERSION: '7.2' |
| 81 | + |
| 82 | + # The MySQL and PostgreSQL jobs run tests across multiple PHP versions. |
| 83 | + # List the PHP versions you want your extension tested with. |
| 84 | + # Default: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]' |
| 85 | + PHP_VERSION_MATRIX: '["7.2"]' |
| 86 | + |
| 87 | + # Generate a code coverage report (see documentation below)? 1 (yes) or 0 (no) |
| 88 | + # Default: 0 |
| 89 | + CODECOV: 0 |
0 commit comments