diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..6e6e746fe --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,44 @@ +name: lint + +on: # zizmor: ignore[dangerous-triggers] + workflow_run: + workflows: [update and build] + types: [completed] + +permissions: {} + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [3.15, 3.14, 3.13, 3.12, 3.11] + continue-on-error: true + steps: + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: 3 + - run: pip install sphinx-lint + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ matrix.version }} + persist-credentials: false + - uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0 + - run: sphinx-lint + + lint-epub: + runs-on: ubuntu-latest + strategy: + matrix: + version: [3.15, 3.14] + continue-on-error: true + steps: + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: 3.x + - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: build-${{ matrix.version }}-epub + - run: uvx epubcheck diff --git a/.github/workflows/update-lint-and-build.yml b/.github/workflows/update-and-build.yml similarity index 78% rename from .github/workflows/update-lint-and-build.yml rename to .github/workflows/update-and-build.yml index 603383c52..5266f7b03 100644 --- a/.github/workflows/update-lint-and-build.yml +++ b/.github/workflows/update-and-build.yml @@ -1,4 +1,4 @@ -name: Translation and Linting Workflow +name: update and build on: schedule: @@ -71,26 +71,6 @@ jobs: branch: ${{ matrix.version }} github_token: ${{ secrets.GITHUB_TOKEN }} - lint: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: [3.15, 3.14, 3.13, 3.12, 3.11] - needs: [update] - continue-on-error: true - steps: - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: 3 - - run: pip install sphinx-lint - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ matrix.version }} - persist-credentials: false - - uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0 - - run: sphinx-lint - build: runs-on: ubuntu-latest strategy: @@ -120,8 +100,10 @@ jobs: - run: sudo apt-get update && sudo apt-get install -y librsvg2-bin if: ${{ matrix.format == 'latex' && fromJSON(matrix.version) >= 3.14 }} - uses: sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1 - - run: make -e SPHINXOPTS="--color -D language='pl' -W --keep-going" ${{ matrix.format }} + - run: make -e SPHINXOPTS="--color -D language='pl' --keep-going" ${{ matrix.format }} working-directory: ./Doc + env: + SPHINXERRORHANDLING: '' - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: success() || failure() with: @@ -131,6 +113,7 @@ jobs: output-pdf: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: version: [3.15, 3.14, 3.13, 3.12, 3.11, '3.10'] needs: [build] @@ -145,20 +128,3 @@ jobs: with: name: build-${{ matrix.version }}-pdf path: . - - lint-epub: - runs-on: ubuntu-latest - strategy: - matrix: - version: [3.15, 3.14] - needs: [build] - continue-on-error: true - steps: - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: 3.x - - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: build-${{ matrix.version }}-epub - - run: uvx epubcheck diff --git a/README.en.md b/README.en.md index 9b3896273..fb9895bc2 100644 --- a/README.en.md +++ b/README.en.md @@ -8,7 +8,7 @@ core_words, _ = progress_from_resources(list(filter(language_switcher, stats))) total_words, total_strings = progress_from_resources(stats) print( -f'''[![build](https://github.com/python/python-docs-pl/actions/workflows/update-lint-and-build.yml/badge.svg)](https://github.com/python/python-docs-pl/actions/workflows/update-lint-and-build.yml) +f'''[![build](https://github.com/python/python-docs-pl/actions/workflows/update-and-build.yml/badge.svg)](https://github.com/python/python-docs-pl/actions/workflows/update-and-build.yml) [![core {core_words:.2f}%](https://img.shields.io/badge/core-{core_words:.2f}%25-0.svg)](https://translations.python.org/#pl) [![Total Translation of Documentation](https://img.shields.io/badge/total_words-{total_words:.2f}%25-0.svg)](https://translations.python.org/#pl) [![Total Translation of Documentation](https://img.shields.io/badge/total_strings-{total_strings:.2f}%25-0.svg)](https://translations.python.org/#pl) diff --git a/README.md b/README.md index 3fd0a527c..4e71b53e1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ core_words, _ = progress_from_resources(list(filter(language_switcher, stats))) total_words, total_strings = progress_from_resources(stats) print( -f'''[![build](https://github.com/python/python-docs-pl/actions/workflows/update-lint-and-build.yml/badge.svg)](https://github.com/python/python-docs-pl/actions/workflows/update-lint-and-build.yml) +f'''[![build](https://github.com/python/python-docs-pl/actions/workflows/update-and-build.yml/badge.svg)](https://github.com/python/python-docs-pl/actions/workflows/update-and-build.yml) [![podstawowe artykuły {core_words:.2f}%](https://img.shields.io/badge/podstawowe_artykuły-{core_words:.2f}%25-0.svg)](https://translations.python.org/#pl) [![postęp tłumaczenia całości dokumentacji](https://img.shields.io/badge/całość_słów-{total_words:.2f}%25-0.svg)](https://translations.python.org/#pl) [![postęp tłumaczenia całości dokumentacji](https://img.shields.io/badge/całość_napisów-{total_strings:.2f}%25-0.svg)](https://translations.python.org/#pl)