From 618e4ce442cbe34f8bca88926b30a0aab61b16bb Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 11 Aug 2025 18:09:12 +0200 Subject: [PATCH] Add linting and test building workflow --- .github/workflows/lint-and-build.yml | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/lint-and-build.yml diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml new file mode 100644 index 0000000..ef0e479 --- /dev/null +++ b/.github/workflows/lint-and-build.yml @@ -0,0 +1,78 @@ +name: Linting and test building workflow + +on: + schedule: + - cron: '0 0 * * *' + push: + branches: + - '*' + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [ '3.14' ] + continue-on-error: true + steps: + - uses: actions/setup-python@master + with: + python-version: 3 + - run: pip install sphinx-lint + - uses: actions/checkout@master + with: + ref: ${{ matrix.version }} + - uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0 + - run: sphinx-lint + + build-translation: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [ '3.14' ] + format: [ html, latex ] + steps: + - uses: actions/setup-python@master + with: + python-version: 3 + - uses: actions/checkout@master + with: + repository: python/cpython + ref: ${{ matrix.version }} + - run: make venv + working-directory: ./Doc + - uses: actions/checkout@master + with: + ref: ${{ matrix.version }} + path: Doc/locales/hu/LC_MESSAGES + - run: git pull + working-directory: ./Doc/locales/hu/LC_MESSAGES + - uses: sphinx-doc/github-problem-matcher@v1.1 + - run: make -e SPHINXOPTS="--color -D language='hu' -W --keep-going" ${{ matrix.format }} + working-directory: ./Doc + - uses: actions/upload-artifact@master + if: success() || failure() + with: + name: build-${{ matrix.version }}-${{ matrix.format }} + path: Doc/build/${{ matrix.format }} + + output-pdf: + runs-on: ubuntu-latest + strategy: + matrix: + version: [ '3.14' ] + needs: [ 'build-translation' ] + steps: + - uses: actions/download-artifact@master + with: + name: build-${{ matrix.version }}-latex + - run: sudo apt-get update + - run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy + - run: make + - uses: actions/upload-artifact@master + with: + name: build-${{ matrix.version }}-pdf + path: . \ No newline at end of file