Skip to content

update workflow

update workflow #37

name: check-for-linter
on:
push:
branches: main
pull_request:
branches: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: xdebug
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Install project
run: make install
- name: Validate files for linter
run: make lint
- name: Run unit tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml tests
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}