-
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (57 loc) · 1.8 KB
/
Copy pathcode-quality.yml
File metadata and controls
70 lines (57 loc) · 1.8 KB
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
name: Code Quality
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.2
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
with:
php-version: ${{ matrix.php }}
tools: composer:v2, wp-cli
coverage: none
- name: Validate Composer configuration
run: |
composer validate
- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
with:
composer-options: "--no-progress"
dependency-versions: "highest"
- name: Install WPGraphQL dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
with:
composer-options: "--no-progress"
dependency-versions: "highest"
working-directory: ./source
- name: Generate stubfile
run: |
bash -x ./generate.sh
- name: Lint stubfile
run: |
php -l wp-graphql-stubs.php
- name: Run PHPStan
run: |
vendor/bin/phpstan
- name: Check for changes
run: |
git diff --exit-code