-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (40 loc) · 1.17 KB
/
phpcs.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
43
44
45
46
47
48
49
name: Moodle Coding Style Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.1
- php: 8.0
- php: 7.4
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: pcov.directory=moodle
coverage: pcov
tools: composer, phpcpd
- name: Install composer dependencies
run: |
composer install
- name: Run phplint
if: ${{ always() }}
run: |
./vendor/bin/phplint
- name: PHP Copy/Paste Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: phpcpd --exclude moodle/tests moodle
- name: Run phpunit
if: ${{ always() }}
run: |
./vendor/bin/phpunit --coverage-text
- name: Test coverage
run: ./vendor/bin/phpunit-coverage-check -t 80 clover.xml