Document strange JsonResponse constructor behaviour #20966
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches-ignore: | |
- 'github-comments' | |
pull_request: | |
branches-ignore: | |
- 'github-comments' | |
jobs: | |
sphinx-build: | |
name: Build (Sphinx) | |
runs-on: ubuntu-latest | |
container: python:3.7-alpine | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
- name: "Display Python version" | |
run: python -c "import sys; print(sys.version)" | |
- name: "Install Sphinx" | |
run: pip install --user sphinx | |
- name: "Install dependencies" | |
run: apk add --no-cache git make | |
- name: "Install custom requirements via pip" | |
run: pip install -r _build/.requirements.txt | |
- name: "Build documentation" | |
run: make -C _build SPHINXOPTS="-nqW -j auto" html | |
symfony-docs-builder-build: | |
name: Build (symfony-tools/docs-builder) | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
- name: "Set-up PHP" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
coverage: none | |
tools: "composer:v2" | |
- name: Get composer cache directory | |
id: composercache | |
working-directory: _build | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: "Install dependencies" | |
working-directory: _build | |
run: composer install --prefer-dist --no-progress | |
- name: "Build the docs" | |
working-directory: _build | |
run: php build.php -vvv | |
- name: Show log file | |
if: ${{ always() }} | |
run: cat _build/logs.txt || true | |
doctor-rst: | |
name: Lint (DOCtor-RST) | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
- name: "Create cache dir" | |
run: mkdir .cache | |
- name: "Extract base branch name" | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF:=${GITHUB_REF##*/}})" | |
id: extract_base_branch | |
- name: "Cache DOCtor-RST" | |
uses: actions/cache@v2 | |
with: | |
path: .cache | |
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }} | |
- name: "Run DOCtor-RST" | |
uses: docker://oskarstark/doctor-rst | |
with: | |
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache | |
symfony-code-block-checker: | |
name: Code Blocks | |
runs-on: Ubuntu-20.04 | |
continue-on-error: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
path: 'docs' | |
- name: Set-up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
coverage: none | |
- name: Fetch branch from where the PR started | |
working-directory: docs | |
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Find modified files | |
id: find-files | |
working-directory: docs | |
run: echo "::set-output name=files::$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep ".rst" | tr '\n' ' ')" | |
- name: Get composer cache directory | |
id: composercache | |
working-directory: docs/_build | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
if: ${{ steps.find-files.outputs.files }} | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-codeBlocks-${{ hashFiles('_checker/composer.lock', '_sf_app/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer-codeBlocks- | |
- name: Install dependencies | |
if: ${{ steps.find-files.outputs.files }} | |
run: composer create-project symfony-tools/code-block-checker _checker | |
- name: Install test application | |
if: ${{ steps.find-files.outputs.files }} | |
run: | | |
git clone -b ${{ github.base_ref }} --depth 5 --single-branch https://github.com/symfony-tools/symfony-application.git _sf_app | |
cd _sf_app | |
composer update | |
- name: Generate baseline | |
if: ${{ steps.find-files.outputs.files }} | |
working-directory: docs | |
run: | | |
CURRENT=$(git rev-parse HEAD) | |
git checkout -m ${{ github.base_ref }} | |
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --generate-baseline=baseline.json --symfony-application=`realpath ../_sf_app` | |
git checkout -m $CURRENT | |
cat baseline.json | |
- name: Verify examples | |
if: ${{ steps.find-files.outputs.files }} | |
working-directory: docs | |
run: | | |
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --baseline=baseline.json --output-format=github --symfony-application=`realpath ../_sf_app` |