-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.2 KB
/
ci.yml
File metadata and controls
49 lines (40 loc) · 1.2 KB
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
43
44
45
46
47
48
49
name: Continuous Integration
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
###################
# Stage 1 - Build #
###################
- name: Checkout latest revision
uses: actions/checkout@v6
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: pcov
- name: Install composer dependencies
uses: ramsey/composer-install@v3
###########################
# Stage 2 - Code Analysis #
###########################
- name: Code Style Fixer
run: vendor/bin/php-cs-fixer fix src --dry-run
- name: Static Code Analysis
run: vendor/bin/phpstan
###################
# Stage 3 - Tests #
###################
- name: Unit Tests
run: php -d pcov.enabled=1 -d pcov.directory=./src -d pcov.exclude="~vendor~" vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Coverage Report as Comment (Clover)
uses: lucassabreu/comment-coverage-clover@main
if: github.event_name == 'pull_request'
with:
file: coverage.xml