-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (36 loc) · 1.17 KB
/
build.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
name: build
on:
push:
branches: [ main, 2.x ]
pull_request:
branches: [ main, 2.x ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [7.4]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate dependencies
run: composer validate
- name: Get dependency cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run static analysis
run: vendor/bin/phpstan analyse
- name: Run test suite
run: phpdbg -qrr vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-clover=coverage.xml
- uses: codecov/codecov-action@v1