-
-
Notifications
You must be signed in to change notification settings - Fork 131
45 lines (38 loc) · 998 Bytes
/
code-quality.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
name: Code Quality
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
paths:
- '**.php'
- '!docs/**'
jobs:
run:
runs-on: ubuntu-latest
name: Testing WooGraphQL code quality w/ PHPStan
steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
coverage: none
- name: Install dependencies
run: |
cp .env.testing .env
rm -rf composer.lock
composer install
SKIP_DB_CREATE=true SKIP_WP_SETUP=true composer installTestEnv
- name: Run PHPStan
run: composer stan