Skip to content

Commit

Permalink
Add phpmd to test script and GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
coenjacobs committed Sep 19, 2024
1 parent 3f8e10c commit b1a58c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,20 @@ jobs:
cache-to: type=gha,mode=max
- name: Run analysis
run: docker compose run --rm actions-tester composer test:phpstan
mess-detect:
runs-on: ubuntu-latest
name: Mess detector
steps:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v4
- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}"
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run mess detector
run: docker compose run --rm actions-tester composer test:phpmd
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"test": [
"@test:lint",
"@test:phpunit",
"@test:phpstan"
"@test:phpstan",
"@test:phpmd"
],
"test:lint": [
"composer validate",
Expand All @@ -58,6 +59,9 @@
],
"test:phpstan": [
"./vendor/bin/phpstan analyse -c phpstan.neon.dist --memory-limit=2G"
],
"test:phpmd": [
"./vendor/bin/phpmd src ansi phpmd.xml.dist"
]
}
}

0 comments on commit b1a58c5

Please sign in to comment.