-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (35 loc) · 984 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
name: Run tests & Analysis
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v4
# PHP
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: xdebug
# Dependencies
- name: Install dependencies with composer
run: composer install -q --ignore-platform-reqs --no-progress --no-suggest --prefer-dist --optimize-autoloader
# Run PHPStan
- name: Run PHPStan
run: composer analyse
# Run tests
- name: Run tests with phpunit
run: export XDEBUG_MODE=coverage && composer test-coverage
# Run analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}