Skip to content

Commit f9d77a2

Browse files
authored
Merge pull request #9090 from datamweb/use-org-github-action
chore: use codeigniter4/.github/.github/ for phpcpd
2 parents 18ba6f2 + 4909cfe commit f9d77a2

File tree

1 file changed

+17
-37
lines changed

1 file changed

+17
-37
lines changed

.github/workflows/test-phpcpd.yml

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
- 'public/**.php'
1313
- 'system/**.php'
1414
- '.github/workflows/test-phpcpd.yml'
15-
1615
push:
1716
branches:
1817
- 'develop'
@@ -23,40 +22,21 @@ on:
2322
- 'system/**.php'
2423
- '.github/workflows/test-phpcpd.yml'
2524

26-
concurrency:
27-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
28-
cancel-in-progress: true
29-
30-
permissions:
31-
contents: read
32-
3325
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

Comments
 (0)