Skip to content

Commit

Permalink
GA: add phpcpd action
Browse files Browse the repository at this point in the history
  • Loading branch information
datamweb committed Nov 6, 2022
1 parent aa78256 commit e538bff
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/phpcpd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHPCPD

on:
pull_request:
branches:
- develop
paths:
- '**.php'
- '.github/workflows/phpcpd.yml'
push:
branches:
- develop
paths:
- '**.php'
- '.github/workflows/phpcpd.yml'

jobs:
build:
name: Code Copy-Paste Detection
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phpcpd
extensions: dom, mbstring
coverage: none

- name: Detect duplicate code
run: phpcpd src/ --min-lines 35 --exclude src/Database/Migrations/2022-10-20-182737_ShieldOAuth.php

0 comments on commit e538bff

Please sign in to comment.