-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 1.92 KB
/
lint_test_pull_requests.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
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
name: "Code style & tests"
on:
pull_request:
# Run this workflow for all PRs against main
branches:
- main
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
php-packages-check:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
composer-command:
- name: PHP Code Style
command: 'style:php:check'
- name: Composer normalize
command: 'style:composer:normalize'
- name: PHPStan
command: analyze:php
- name: PHPUnit
command: test:php
- name: Rector
command: 'rector'
dependency-versions:
- name: Newest
parameter: 'highest'
- name: Oldest
parameter: 'lowest'
name: ${{ matrix.composer-command.name }}/${{ matrix.dependency-versions.name }} deps
steps:
- name: "Checkout"
uses: actions/checkout@v4
# see https://github.com/shivammathur/setup-php
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
# see https://github.com/ramsey/composer-install
- name: "Install Composer dependencies"
uses: ramsey/composer-install@v3
with:
dependency-versions: '${{ matrix.dependency-versions.parameter }}'
- name: 'Run check "${{ matrix.composer-command.name }}"'
run: composer ${{ matrix.composer-command.command }}
e2e-tests:
runs-on: ubuntu-latest
name: End to end tests
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Run tests
working-directory: e2e
run: ./run-test.sh