-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.38 KB
/
phpunit.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
50
51
52
53
54
55
name: PHP - PhpUnit Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: xdebug
tools: composer:v2
- name: Validate composer.json and composer.lock
run: composer validate
working-directory: PHP/phpunit
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
working-directory: PHP/phpunit
- name: Run tests
run: ./vendor/bin/phpunit --coverage-clover ./.qodana/code-coverage/coverage.xml --configuration phpunit.xml --filter FooTest --test-suffix FooTest.php
working-directory: PHP/phpunit
env:
XDEBUG_MODE: coverage
- name: Archive coverage data
uses: actions/upload-artifact@v2
with:
name: php-coverage-data
path: PHP/phpunit/.qodana/code-coverage
- name: Qodana Scan
uses: JetBrains/qodana-action@main
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_PHP }}
with:
args: "-i,PHP/phpunit,--linter,jetbrains/qodana-php:latest"
pr-mode: false