Skip to content

testing SARIF report #50

testing SARIF report

testing SARIF report #50

Workflow file for this run

name: PHP Copy/Paste Detector
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the docker image
run: make build-dev
- name: Start the docker image
run: make start
- name: Check running container
run: docker ps -a
- name: Show php, composer, phing, phive versions
run: make info
- name: Cleanup build artifacts and install composer dependencies
run: make setup
- name: Run test suite
run: make phpunit
- name: Report code coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: make report-code-coverage
- name: Run coding standard
run: make ecs
- name: Run codeSniffer
run: make phpcs
- name: Run PHPStan
run: make phpstan
- name: Stop and remove environment container, network
run: make down
tests:
runs-on: ${{ matrix.operating-system }}
permissions:
security-events: write
actions: read
contents: read
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '8.4', '8.5' ]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
- uses: actions/checkout@v4
- name: Check php version
run: php -v
- name: Test latest PHPCPD release
run: php ./releases/phpcpd-9.1.0.phar --log-sarif=reports/phpcpd/phpcpd-report.sarif src tests
- name: Upload SARIF report to GitHub
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: reports/phpcpd/phpcpd-report.sarif
category: phpcpd-${{ matrix.php-versions }}