-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (45 loc) · 1.28 KB
/
lint.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
name: lint
on:
push:
branches: [ 'main' ]
pull_request:
workflow_dispatch:
jobs:
lint:
name: "Linting (PHP ${{ matrix.php-version }})"
runs-on: "ubuntu-22.04"
continue-on-error: true
strategy:
matrix:
php-version: [ "8.1" ]
env:
COMPOSER_VERSION: 2
COVERAGE_DRIVER: none
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ env.COVERAGE_DRIVER }}
tools: composer:${{ env.COMPOSER_VERSION }}
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Run PHP-CS-Fixer
run: php vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php --verbose --dry-run
validate:
name: "Validating composer.json"
runs-on: "ubuntu-22.04"
continue-on-error: true
env:
COMPOSER_VERSION: 2
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:${{ env.COMPOSER_VERSION }}
- name: Run composer validate
run: composer validate