Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://docs.github.com/en/actions

name: "Build"
name: "Structure"

on:
pull_request: null
Expand All @@ -10,24 +10,18 @@ on:

jobs:
build:
name: "Build"
name: "Check Build"

runs-on: "ubuntu-22.04"

strategy:
matrix:
language:
- "fr"

steps:
- name: "Checkout php/doc-${{ matrix.language }}"
- name: "Checkout php/doc-fr"
uses: "actions/checkout@v4"
with:
path: "${{ matrix.language }}"
repository: "php/doc-${{ matrix.language }}"
path: "fr"
repository: "php/doc-fr"

- name: "Checkout php/doc-en as fallback"
if: "matrix.language != 'en'"
uses: "actions/checkout@v4"
with:
path: "en"
Expand All @@ -44,5 +38,5 @@ jobs:
php8.1 doc-base/scripts/qa/extensions.xml.php --check
php8.1 doc-base/scripts/qa/section-order.php

- name: "Build documentation for ${{ matrix.language }}"
run: "php8.1 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
- name: "Build documentation for fr"
run: "php8.1 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=fr"
47 changes: 47 additions & 0 deletions .github/workflows/check-en-revision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# https://docs.github.com/en/actions
# Vérifie que le commentaire EN-Revision des fichiers .xml touchés par une PR
# pointe le dernier commit doc-en du fichier. Émet une annotation ::error et
# échoue si le hash est absent, faux, d'un autre fichier, ou en retard.

name: "Structure"

on:
pull_request:
branches: ["master"]
types: [opened, synchronize]

permissions:
contents: read

jobs:
revision:
name: "Check EN-Revision"
runs-on: ubuntu-latest
steps:
- name: "Checkout php/doc-fr"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Checkout php/doc-en"
uses: actions/checkout@v4
with:
path: en
repository: php/doc-en
fetch-depth: 0

- name: "Check EN-Revision"
run: |
BASE="${{ github.event.pull_request.base.sha }}"
git fetch --no-tags --depth=1 origin "$BASE"
fail=0
while IFS= read -r f; do
[ -f "$f" ] && [ -f "en/$f" ] || continue
declared=$(grep -oiP 'EN-Revision:\s*\K[0-9a-f]+' "$f" | head -1 || true)
latest=$(git -C en log -1 --format=%H -- "$f")
if [ "$declared" != "$latest" ]; then
echo "::error file=$f::EN-Revision ${declared:-absent} != dernier commit doc-en $latest"
fail=1
fi
done < <(git diff --name-only "$BASE"...HEAD -- '*.xml')
exit $fail
4 changes: 2 additions & 2 deletions .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Check style"
name: "Style"

on:
pull_request:
Expand All @@ -9,7 +9,7 @@ permissions:

jobs:
check-style:
name: "TRADUCTIONS.txt"
name: "Check Translations"
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-whitespace.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: check-whitespace
name: "Style"

# Get the repository with all commits to ensure that we can analyze
# all of the commits contributed via the Pull Request.
Expand All @@ -14,6 +14,7 @@ permissions:

jobs:
check-whitespace:
name: "Check Whitespace"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand Down
Loading