| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,7 @@ | |||
| 1 | - # From python-docs-translations/transifex-automations | ||
| 2 | - # Orignals: https://github.com/python-docs-translations/transifex-automations/tree/main/sample-workflows | ||
| 1 | + # Adapted from python-docs-translations/transifex-automations | ||
| 2 | + # Originals (reviewed at f7ac74cc364ac066273d13755e9943db13f49206): | ||
| 3 | + # https://github.com/python-docs-translations/transifex-automations/blob/main/sample-workflows/po-lint.yml | ||
| 4 | + # https://github.com/python-docs-translations/transifex-automations/blob/main/sample-workflows/test-build.yml | ||
| 3 | 5 | name: Linting and Building Workflow | |
| 4 | 6 | ||
| 5 | 7 | on: | |
@@ -19,28 +21,38 @@ jobs: | |||
| 19 | 21 | strategy: | |
| 20 | 22 | fail-fast: false | |
| 21 | 23 | matrix: | |
| 22 | - version: [ '3.14', '3.13' ] | ||
| 24 | + version: [ '3.15', '3.14', '3.13' ] | ||
| 23 | 25 | format: [ html ] | |
| 24 | 26 | steps: | |
| 25 | - - uses: actions/setup-python@master | ||
| 27 | + - name: Set up Python | ||
| 28 | + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| 26 | 29 | with: | |
| 27 | - python-version: 3.12 # pinned for Sphinx 3.4.3 to build 3.10 | ||
| 28 | - - uses: actions/checkout@master | ||
| 30 | + python-version: ${{ matrix.version }} | ||
| 31 | + allow-prereleases: true | ||
| 32 | + - name: Check out CPython | ||
| 33 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 29 | 34 | with: | |
| 30 | 35 | repository: python/cpython | |
| 31 | 36 | ref: ${{ matrix.version }} | |
| 32 | - - run: make venv | ||
| 37 | + persist-credentials: false | ||
| 38 | + - name: Install uv for CPython's locked documentation dependencies | ||
| 39 | + run: python -m pip install uv | ||
| 40 | + - name: Create documentation environment | ||
| 41 | + run: make venv PYTHON=python | ||
| 33 | 42 | working-directory: ./Doc | |
| 34 | - - uses: actions/checkout@master | ||
| 43 | + - name: Check out translations | ||
| 44 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 35 | 45 | with: | |
| 36 | - ref: ${{ matrix.version }} | ||
| 46 | + # Check the triggering commit when it belongs to this version. | ||
| 47 | + ref: ${{ matrix.version == github.ref_name && github.sha || matrix.version }} | ||
| 37 | 48 | path: Doc/locales/ja/LC_MESSAGES | |
| 38 | - - run: git pull | ||
| 39 | - working-directory: ./Doc/locales/ja/LC_MESSAGES | ||
| 40 | - - uses: sphinx-doc/github-problem-matcher@v1.1 | ||
| 41 | - - run: make -e SPHINXOPTS="--color -D language='ja' -W --keep-going" ${{ matrix.format }} | ||
| 49 | + persist-credentials: false | ||
| 50 | + - uses: sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1 | ||
| 51 | + - name: Build Japanese documentation | ||
| 52 | + run: make -e SPHINXOPTS="--color -D language=ja -W --keep-going" ${{ matrix.format }} | ||
| 42 | 53 | working-directory: ./Doc | |
| 43 | - - uses: actions/upload-artifact@master | ||
| 54 | + - name: Upload documentation | ||
| 55 | + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||
| 44 | 56 | if: success() || failure() | |
| 45 | 57 | with: | |
| 46 | 58 | name: build-${{ matrix.version }}-${{ matrix.format }} | |
@@ -51,15 +63,20 @@ jobs: | |||
| 51 | 63 | strategy: | |
| 52 | 64 | fail-fast: false | |
| 53 | 65 | matrix: | |
| 54 | - version: [ '3.14', '3.13' ] | ||
| 66 | + version: [ '3.15', '3.14', '3.13' ] | ||
| 55 | 67 | continue-on-error: true | |
| 56 | 68 | steps: | |
| 57 | - - uses: actions/setup-python@master | ||
| 69 | + - name: Set up Python | ||
| 70 | + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| 58 | 71 | with: | |
| 59 | - python-version: 3 | ||
| 60 | - - run: pip install sphinx-lint | ||
| 61 | - - uses: actions/checkout@master | ||
| 72 | + python-version: ${{ matrix.version }} | ||
| 73 | + allow-prereleases: true | ||
| 74 | + - name: Install sphinx-lint | ||
| 75 | + run: python -m pip install sphinx-lint | ||
| 76 | + - name: Check out translations | ||
| 77 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| 62 | 78 | with: | |
| 63 | - ref: ${{ matrix.version }} | ||
| 64 | - - uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0 | ||
| 79 | + ref: ${{ matrix.version == github.ref_name && github.sha || matrix.version }} | ||
| 80 | + persist-credentials: false | ||
| 81 | + - uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0 | ||
| 65 | 82 | - run: sphinx-lint | |
| Back | FazBrowse Home | New Git URL |
0 commit comments