-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.61 KB
/
ci.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
name: Hydrogen CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
tools: cs2pr
- name: Configure Cineman Repo
run: >-
composer config repositories.cineman '{"type": "composer", "url":
"https://repos-php.cineman.ch", "options": { "http": { "header": [
"X-Access-Token: ${{ secrets.CINEMAN_REPO_ACCESS_TOKEN }}" ]}}}'
- name: Install luaSandbox
run: sudo apt-get update && sudo apt-get install -y liblua5.1-0-dev && sudo pecl install luaSandbox && grep -qxF 'extension=luasandbox.so' /etc/php/${{ matrix.php-versions }}/cli/php.ini || echo 'extension=luasandbox.so' >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPUnit
run: php vendor/bin/phpunit --coverage-text
- name: Run PHPStan
if: ${{ matrix.php-versions == '8.1' }}
run: php vendor/bin/phpstan analyse src --error-format=github -l8
- name: Run PHPCS
if: ${{ matrix.php-versions == '8.1' }}
run: php vendor/bin/phpcs src/ --standard=vendor/cineman/hydrogen-cs --report=checkstyle | cs2pr --graceful-warnings