From 7082d4ba3734cfbb897bf831601a1aeaee1493eb Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 29 Apr 2025 10:07:47 +0530 Subject: [PATCH 1/5] feat/ci: extend test workflow for windows-arm --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82e054f..91be440 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,10 +94,11 @@ jobs: tldr tldr --markdown build-windows: - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: matrix: + os: ['windows-latest', 'windows-11-arm'] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: From 1a19b533d9f2ee98c2fd3a547f311600d09e4622 Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 29 Apr 2025 10:20:24 +0530 Subject: [PATCH 2/5] fix: add separate build with only compatible Python versions --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91be440..cbb381c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,11 +94,10 @@ jobs: tldr tldr --markdown build-windows: - runs-on: ${{ matrix.os }} + runs-on: windows-latest strategy: matrix: - os: ['windows-latest', 'windows-11-arm'] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: @@ -138,6 +137,50 @@ jobs: tldr --version tldr tldr --markdown + build-windows-arm: + runs-on: windows-11-arm + + strategy: + matrix: + python-version: ['3.11', '3.12', '3.13'] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install developer dependencies + run: | + python3 -m pip install -U pip + python3 -m pip install -U pytest pytest-runner flake8 + + - name: Install sphinx dependencies + run: | + python -m pip install sphinx sphinx-argparse --user + + - name: Install tldr dependencies + run: + python3 -m pip install -r requirements.txt --user + + - name: Generate the manpage + working-directory: docs + run: make man + + - name: Lint codebase + run: python3 -m flake8 + + - name: Run test suite + run: python3 -m pytest tests/ + + - name: Test tldr cli + run: | + python3 -m pip install . + tldr --version + tldr tldr --markdown + build-snap: runs-on: ${{ matrix.os }} if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main' From 36361dc9bee56865f5ce77d46901f6dfca1a32ff Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 29 Apr 2025 10:29:46 +0530 Subject: [PATCH 3/5] test: updated command for sphinx setup --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbb381c..9d1a2d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -159,7 +159,8 @@ jobs: - name: Install sphinx dependencies run: | - python -m pip install sphinx sphinx-argparse --user + choco install sphinx + python -m pip install sphinx-argparse --user - name: Install tldr dependencies run: From 4b2062a2f34525f3158bc9bcce4c4dfff7cde89e Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 29 Apr 2025 10:43:56 +0530 Subject: [PATCH 4/5] cleanup: update workflow --- .github/workflows/test.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d1a2d1..fdd2488 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,9 @@ jobs: build-linux: runs-on: ${{ matrix.os }} + permissions: + contents: read + strategy: matrix: os: ['ubuntu-latest', 'ubuntu-24.04-arm'] @@ -51,6 +54,9 @@ jobs: build-macos: runs-on: macos-latest + permissions: + contents: read + strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10', 'pypy3.11'] @@ -96,6 +102,9 @@ jobs: build-windows: runs-on: windows-latest + permissions: + contents: read + strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] @@ -139,6 +148,9 @@ jobs: build-windows-arm: runs-on: windows-11-arm + + permissions: + contents: read strategy: matrix: @@ -159,8 +171,8 @@ jobs: - name: Install sphinx dependencies run: | - choco install sphinx - python -m pip install sphinx-argparse --user + python -m pip install sphinx sphinx-argparse --user + $env:SPHINXBUILD = "D:\Python3\Scripts\sphinx-build.exe" - name: Install tldr dependencies run: @@ -184,9 +196,12 @@ jobs: build-snap: runs-on: ${{ matrix.os }} - if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main' + # if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main' needs: ['build-linux'] + permissions: + contents: read + strategy: matrix: os: ['ubuntu-latest', 'ubuntu-24.04-arm'] From 211c06168d859a113a39f42444871d8c98b21b83 Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Tue, 29 Apr 2025 10:50:43 +0530 Subject: [PATCH 5/5] test: building windows-arm package without manpage --- .github/workflows/test.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdd2488..be5fa63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,19 +169,10 @@ jobs: python3 -m pip install -U pip python3 -m pip install -U pytest pytest-runner flake8 - - name: Install sphinx dependencies - run: | - python -m pip install sphinx sphinx-argparse --user - $env:SPHINXBUILD = "D:\Python3\Scripts\sphinx-build.exe" - - name: Install tldr dependencies run: python3 -m pip install -r requirements.txt --user - - name: Generate the manpage - working-directory: docs - run: make man - - name: Lint codebase run: python3 -m flake8 @@ -196,7 +187,7 @@ jobs: build-snap: runs-on: ${{ matrix.os }} - # if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main' + if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main' needs: ['build-linux'] permissions: