Skip to content

Commit 0f8b283

Browse files
authored
feat/ci: extend test workflow for windows-arm, set read permission for jobs (#282)
1 parent 5737b9c commit 0f8b283

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ jobs:
66
build-linux:
77
runs-on: ${{ matrix.os }}
88

9+
permissions:
10+
contents: read
11+
912
strategy:
1013
matrix:
1114
os: ['ubuntu-latest', 'ubuntu-24.04-arm']
@@ -51,6 +54,9 @@ jobs:
5154
build-macos:
5255
runs-on: macos-latest
5356

57+
permissions:
58+
contents: read
59+
5460
strategy:
5561
matrix:
5662
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10', 'pypy3.11']
@@ -96,6 +102,9 @@ jobs:
96102
build-windows:
97103
runs-on: windows-latest
98104

105+
permissions:
106+
contents: read
107+
99108
strategy:
100109
matrix:
101110
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
@@ -137,11 +146,53 @@ jobs:
137146
tldr --version
138147
tldr tldr --markdown
139148
149+
build-windows-arm:
150+
runs-on: windows-11-arm
151+
152+
permissions:
153+
contents: read
154+
155+
strategy:
156+
matrix:
157+
python-version: ['3.11', '3.12', '3.13']
158+
159+
steps:
160+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
161+
162+
- name: Set up Python ${{ matrix.python-version }}
163+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
164+
with:
165+
python-version: ${{ matrix.python-version }}
166+
167+
- name: Install developer dependencies
168+
run: |
169+
python3 -m pip install -U pip
170+
python3 -m pip install -U pytest pytest-runner flake8
171+
172+
- name: Install tldr dependencies
173+
run:
174+
python3 -m pip install -r requirements.txt --user
175+
176+
- name: Lint codebase
177+
run: python3 -m flake8
178+
179+
- name: Run test suite
180+
run: python3 -m pytest tests/
181+
182+
- name: Test tldr cli
183+
run: |
184+
python3 -m pip install .
185+
tldr --version
186+
tldr tldr --markdown
187+
140188
build-snap:
141189
runs-on: ${{ matrix.os }}
142190
if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main'
143191
needs: ['build-linux']
144192

193+
permissions:
194+
contents: read
195+
145196
strategy:
146197
matrix:
147198
os: ['ubuntu-latest', 'ubuntu-24.04-arm']

0 commit comments

Comments
 (0)