-
-
Notifications
You must be signed in to change notification settings - Fork 877
57 lines (54 loc) · 2.36 KB
/
guides.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
name: Guides
on:
push:
pull_request:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERAGE: '0'
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
jobs:
docs:
name: Test guides
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP with pre-release PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: pecl, composer
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite
coverage: none
ini-values: memory_limit=-1
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Global require pdg
run: |
cd $(composer -n config --global home)
echo "{\"repositories\":[{\"type\":\"vcs\",\"url\":\"https://github.com/php-documentation-generator/php-documentation-generator\"}]}" > composer.json
composer global config --no-plugins allow-plugins.symfony/runtime true
composer global require php-documentation-generator/php-documentation-generator:dev-main
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install project dependencies
working-directory: docs
run: composer install --no-interaction --no-progress --ansi && composer require webonyx/graphql-php
- name: Test guides
working-directory: docs
env:
APP_DEBUG: 0
PDG_AUTOLOAD: ${{ github.workspace }}/docs/vendor/autoload.php
KERNEL_CLASS: \ApiPlatform\Playground\Kernel
run: |
for d in guides/*.php; do
rm -f var/data.db
echo "Testing guide $d"
pdg-phpunit $d || exit 1
done