-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.16 KB
/
ci.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
36
37
38
39
40
41
42
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
env:
PHP_VERSION: 8.2
jobs:
validate:
name: 'Build & validate'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: xdebug, zip, pcov
env:
GITHUB_TOKEN: ${{ secrets.REPO_READONLY_TOKEN }}
- name: 'Composer install'
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}'
run: composer install --no-interaction --no-scripts --no-progress --prefer-dist --no-ansi
- name: Static analysis with PHPStan
run: composer phpstan
- name: Coding style PSR12 Check
run: composer phpcs
- name: Execute tests (Unit and Feature)
run: composer test
- name: Run SonarCloud scanner
uses: minvws/nl-irealisatie-generic-pipelines/.github/actions/sonarcloud@main
with:
sonar-token: ${{ secrets.SONAR_TOKEN }}