-
-
Notifications
You must be signed in to change notification settings - Fork 87
88 lines (67 loc) · 2.53 KB
/
integration.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: "Continuous Integration"
on: [push, pull_request]
jobs:
build:
name: Build captainhook on ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
php: ['8.0', '8.1', '8.2']
buildphar: [true]
experimental: [false]
include:
- php: 8.3
buildphar: false
experimental: false
env:
PHAR: build/phar/captainhook.phar
steps:
- uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: mbstring
- name: PHP Version
run: php -v
- name: Update composer
run: composer self-update
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install tooling
run: GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} tools/phive --no-progress --home ./.phive install --force-accept-unsigned --trust-gpg-keys 4AA394086372C20A,31C7E470E2138192,8E730BA25823D8B5,CF1A108D0E7AE720,2DF45277AEF09A2F,51C67305FFC2E5C0
- name: Execute unit tests
run: tools/phpunit --no-coverage --testsuite UnitTests
- name: Execute integration tests
run: tools/phpunit --no-coverage --testsuite IntegrationTests
- name: Execute dummy pre commit
run: bin/captainhook --configuration=build/captainhook.json hook:pre-commit
- name: Check coding style
run: tools/phpcs --standard=psr12 src tests
- name: Static code analysis
run: tools/phpstan analyse
- name: Force install Symfony 5
if: ${{ matrix.buildphar }}
run: COMPOSER=composer.phar.json composer update
- name: Validate configuration for humbug/box
if: ${{ matrix.buildphar }}
run: tools/box validate box.json
- name: Compile phar with humbug/box
if: ${{ matrix.buildphar }}
run: tools/box compile
- name: Show info about generated phar with humbug/box
if: ${{ matrix.buildphar }}
run: tools/box info ${{ env.PHAR }}
- name: Run phar
if: ${{ matrix.buildphar }}
run: ${{ env.PHAR }} --help
- name: Run phar pre-commit
if: ${{ matrix.buildphar }}
run: ${{ env.PHAR }} --configuration=build/captainhook.json hook:pre-commit
- name: Run phar pre-push
if: ${{ matrix.buildphar }}
run: ${{ env.PHAR }} --configuration=build/captainhook.json hook:pre-push