-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.48 KB
/
pr.yml
File metadata and controls
37 lines (37 loc) · 1.48 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
on: [pull_request]
name: CodeGenerator
jobs:
symfony:
name: PHP - Tests & Coverage degradation check
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, xml, ctype, iconv, pgsql, apcu, pcov
coverage: pcov
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Prepare
run: |
composer install --no-scripts --no-interaction
- name: Run tests
run: |
vendor/bin/phpunit --configuration phpunit.xml.dist -d memory_limit=2G --coverage-clover coverage.xml
- name: Update base coverage
uses: OpenClassrooms/coverage-checker@v1.6.0
with:
action: check
token: ${{ secrets.GITHUB_TOKEN }}