|
12 | 12 | - 'public/**.php'
|
13 | 13 | - 'system/**.php'
|
14 | 14 | - '.github/workflows/test-phpcpd.yml'
|
15 |
| - |
16 | 15 | push:
|
17 | 16 | branches:
|
18 | 17 | - 'develop'
|
|
23 | 22 | - 'system/**.php'
|
24 | 23 | - '.github/workflows/test-phpcpd.yml'
|
25 | 24 |
|
26 |
| -concurrency: |
27 |
| - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
28 |
| - cancel-in-progress: true |
29 |
| - |
30 |
| -permissions: |
31 |
| - contents: read |
32 |
| - |
33 | 25 | jobs:
|
34 |
| - build: |
35 |
| - name: Duplicate Code Detection |
36 |
| - runs-on: ubuntu-22.04 |
37 |
| - steps: |
38 |
| - - name: Checkout |
39 |
| - uses: actions/checkout@v4 |
40 |
| - |
41 |
| - - name: Setup PHP |
42 |
| - uses: shivammathur/setup-php@v2 |
43 |
| - with: |
44 |
| - php-version: '8.1' |
45 |
| - tools: phpcpd |
46 |
| - extensions: dom, mbstring |
47 |
| - |
48 |
| - - name: Detect code duplication |
49 |
| - run: phpcpd |
50 |
| - --exclude system/Test |
51 |
| - --exclude system/ThirdParty |
52 |
| - --exclude system/Database/SQLSRV/Builder.php |
53 |
| - --exclude system/Database/SQLSRV/Forge.php |
54 |
| - --exclude system/Database/MySQLi/Builder.php |
55 |
| - --exclude system/Database/OCI8/Builder.php |
56 |
| - --exclude system/Database/Postgre/Builder.php |
57 |
| - --exclude system/Debug/Exceptions.php |
58 |
| - --exclude system/HTTP/SiteURI.php |
59 |
| - --exclude system/Validation/Rules.php |
60 |
| - --exclude system/Autoloader/Autoloader.php |
61 |
| - --exclude system/Config/Filters.php |
62 |
| - -- app/ public/ system/ |
| 26 | + phpcpd: |
| 27 | + uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main |
| 28 | + with: |
| 29 | + dirs: "app/ public/ system/" |
| 30 | + options: >- |
| 31 | + --exclude system/Test |
| 32 | + --exclude system/ThirdParty |
| 33 | + --exclude system/Database/SQLSRV/Builder.php |
| 34 | + --exclude system/Database/SQLSRV/Forge.php |
| 35 | + --exclude system/Database/MySQLi/Builder.php |
| 36 | + --exclude system/Database/OCI8/Builder.php |
| 37 | + --exclude system/Database/Postgre/Builder.php |
| 38 | + --exclude system/Debug/Exceptions.php |
| 39 | + --exclude system/HTTP/SiteURI.php |
| 40 | + --exclude system/Validation/Rules.php |
| 41 | + --exclude system/Autoloader/Autoloader.php |
| 42 | + --exclude system/Config/Filters.php |
0 commit comments