-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.72 KB
/
ci.yaml
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
on:
pull_request:
push:
branches:
- main
jobs:
static-analyze:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- run: vendor/bin/phpstan analyse -c phpstan.neon
# - run: vendor/bin/ecs check --config vendor/landingi/php-coding-standards/ecs.php
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- run: vendor/bin/phpunit --testsuite all --coverage-clover=build/coverage.xml
- run: bash <(curl -s https://codecov.io/bash) -f build/coverage.xml