diff --git a/.github/sphinx_lint_matcher.json b/.github/sphinx_lint_matcher.json new file mode 100644 index 0000000000..41896d8f18 --- /dev/null +++ b/.github/sphinx_lint_matcher.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "sphinx-lint-problem-matcher", + "pattern": [ + { + "regexp": "^(.*):(\\d+):\\s+(.*)$", + "file": 1, + "line": 2, + "message": 3 + } + ] + } + ] +} diff --git a/.github/workflows/test-translations.yml b/.github/workflows/test-translations.yml index 50f2dd0671..45dc60aa3d 100644 --- a/.github/workflows/test-translations.yml +++ b/.github/workflows/test-translations.yml @@ -58,7 +58,7 @@ jobs: ref: ${{ env.I18N_BRANCH }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: >- 3.10 @@ -66,8 +66,16 @@ jobs: - name: Install Python tooling run: python -m pip install --upgrade nox virtualenv sphinx-lint + - name: Set Sphinx problem matcher + uses: sphinx-doc/github-problem-matcher@v1.0 + - name: Build translated docs in ${{ matrix.language }} run: nox -s build -- -q -D language=${{ matrix.language }} + - name: Set Sphinx Lint problem matcher + if: always() + run: echo '::add-matcher::.github/sphinx_lint_matcher.json' + - name: Lint translation file + if: always() run: sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po