|
1 | 1 | name: Tests |
2 | 2 |
|
3 | | -env: |
4 | | - EXTNAME: lukewcs/togglectrl # 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: 0 # 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 |
10 | | - |
11 | 3 | on: |
12 | 4 | push: |
13 | | - branches: # Run tests when commits are pushed to these branches in your repo |
| 5 | + branches: # Run tests when commits are pushed to these branches in your repo |
| 6 | + - main |
14 | 7 | - master |
15 | 8 | - develop |
16 | | - pull_request: # Run tests when pull requests are made on these branches in your repo |
| 9 | + - dev/* |
| 10 | + pull_request: # Run tests when pull requests are made on these branches in your repo |
17 | 11 | branches: |
| 12 | + - main |
18 | 13 | - master |
19 | 14 | - develop |
| 15 | + - dev/* |
20 | 16 |
|
21 | 17 | jobs: |
22 | | - # START Basic Checks Job (EPV, code sniffer, images check, etc.) |
23 | | - basic-checks: |
24 | | - runs-on: ubuntu-20.04 |
25 | | - strategy: |
26 | | - matrix: |
27 | | - include: |
28 | | - - php: '7.3' |
29 | | - db: "none" |
30 | | - NOTESTS: 1 |
31 | | - |
32 | | - name: PHP ${{ matrix.php }} - ${{ matrix.db }} |
33 | | - |
34 | | - steps: |
35 | | - - name: Checkout phpBB |
36 | | - uses: actions/checkout@v2 |
37 | | - with: |
38 | | - repository: phpbb/phpbb |
39 | | - ref: ${{ env.PHPBB_BRANCH }} |
40 | | - path: phpBB3 |
41 | | - |
42 | | - - name: Checkout extension |
43 | | - uses: actions/checkout@v2 |
44 | | - with: |
45 | | - path: phpBB3/phpBB/ext/${{ env.EXTNAME }} |
46 | | - |
47 | | - - name: Setup PHP |
48 | | - uses: shivammathur/setup-php@v2 |
49 | | - with: |
50 | | - php-version: ${{ matrix.php }} |
51 | | - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap |
52 | | - coverage: none |
53 | | - |
54 | | - - name: Setup environment for phpBB |
55 | | - env: |
56 | | - DB: ${{ matrix.db }} |
57 | | - PHP_VERSION: ${{ matrix.php }} |
58 | | - NOTESTS: '1' |
59 | | - run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS |
60 | | - working-directory: ./phpBB3 |
61 | | - |
62 | | - - name: Setup EPV |
63 | | - if: ${{ env.EPV != 0 }} |
64 | | - run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs |
65 | | - working-directory: ./phpBB3/phpBB |
66 | | - |
67 | | - - name: Run code sniffer |
68 | | - if: ${{ env.SNIFF != 0 }} |
69 | | - env: |
70 | | - NOTESTS: '1' |
71 | | - run: .github/ext-sniff.sh $EXTNAME $NOTESTS |
72 | | - working-directory: ./phpBB3 |
73 | | - |
74 | | - - name: Check image ICC profiles |
75 | | - if: ${{ env.IMAGE_ICC != 0 }} |
76 | | - run: .github/check-image-icc-profiles.sh |
77 | | - working-directory: ./phpBB3 |
78 | | - |
79 | | - - name: Check executable files |
80 | | - if: ${{ env.EXECUTABLE_FILES != 0 }} |
81 | | - run: .github/ext-check-executable-files.sh ./ $EXTNAME |
82 | | - working-directory: ./phpBB3 |
83 | | - |
84 | | - - name: Run EPV |
85 | | - if: ${{ env.EPV != 0 }} |
86 | | - run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/" |
87 | | - working-directory: ./phpBB3 |
88 | | - # END Basic Checks Job |
| 18 | + call-tests: |
| 19 | + name: Extension tests |
| 20 | + uses: phpbb-extensions/test-framework/.github/workflows/[email protected] # Must match PHPBB_BRANCH |
| 21 | + with: |
| 22 | + EXTNAME: lukewcs/togglectrl # Your extension vendor/package name |
| 23 | + PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on |
| 24 | + RUN_MYSQL_JOBS: 0 |
| 25 | + RUN_PGSQL_JOBS: 0 |
| 26 | + RUN_MSSQL_JOBS: 0 |
| 27 | + RUN_WINDOWS_JOBS: 0 |
| 28 | + PRIMARY_PHP_VERSION: '8.4' |
0 commit comments