Skip to content

Commit ed7b245

Browse files
committed
Open issues about missing configuration reference
1 parent 346397c commit ed7b245

File tree

4 files changed

+184
-693
lines changed

4 files changed

+184
-693
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Verify docs
2+
3+
on:
4+
push:
5+
branches:
6+
- "config-reference"
7+
schedule:
8+
- cron: '0 10 * * *'
9+
10+
jobs:
11+
use:
12+
name: Configuration reference
13+
runs-on: Ubuntu-20.04
14+
strategy:
15+
fail-fast: false
16+
17+
steps:
18+
- name: Set up PHP
19+
uses: shivammathur/[email protected]
20+
with:
21+
php-version: 7.4
22+
coverage: none
23+
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Get composer cache directory
28+
id: composer-cache
29+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v2
33+
with:
34+
path: ${{ steps.composer-cache.outputs.dir }}
35+
key: composer-${{ runner.os }}-7.4-${{ hashFiles('composer.*') }}
36+
restore-keys: |
37+
composer-${{ runner.os }}-7.4-
38+
composer-${{ runner.os }}-
39+
composer-
40+
41+
- name: Checkout Symfony repo
42+
run: composer create-project --stability dev symfony/website-skeleton .github/workflows/docs-configuration-reference/symfony
43+
44+
- name: Checkout Symfony Docs repo
45+
run: git clone https://github.com/symfony/symfony-docs .github/workflows/docs-configuration-reference/docs
46+
47+
- name: Download dependencies
48+
run: composer install --no-interaction --optimize-autoloader
49+
50+
- name: Verify docs
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.CARSONPROD_GITHUB_TOKEN }}
53+
run: |
54+
CURRENT_DIR=$(pwd)
55+
for item in "debug:DebugBundle" "doctrine:DoctrineBundle" "framework:FrameworkBundle" "security:SecurityBundle" "twig:TwiBundle" "web_profiler:WebProfilerBundle"
56+
do
57+
FILE=$(echo $item | cut -d ":" -f1)
58+
BUNDLE=$(echo $item | cut -d ":" -f2)
59+
echo ::group::$BUNDLE
60+
61+
echo "Trying to find missing config keys"
62+
cd .github/workflows/docs-configuration-reference
63+
./run.php `pwd`/symfony `pwd`/docs/reference/configuration/$FILE.rst $BUNDLE > $CURRENT_DIR/output.txt
64+
cat output.txt
65+
66+
cd $CURRENT_DIR
67+
if [ -s ./output.txt ]; then
68+
echo "Creating an issue"
69+
echo -e "I found that there are some configuration missing for the $BUNDLE configuration reference page. This is a list of what is missing: \n\n\`\`\`" > issue.txt
70+
cat ./output.txt >> issue.txt
71+
echo -e "\n\`\`\`\n\nCould someone please add these?" >> issue.txt
72+
bin/console app:issue:open symfony/symfony-docs "[$BUNDLE] Missing configuration reference" `pwd`/issue.txt
73+
fi
74+
echo ::endgroup::
75+
done

0 commit comments

Comments
 (0)