|
6 | 6 | build-linux:
|
7 | 7 | runs-on: ${{ matrix.os }}
|
8 | 8 |
|
| 9 | + permissions: |
| 10 | + contents: read |
| 11 | + |
9 | 12 | strategy:
|
10 | 13 | matrix:
|
11 | 14 | os: ['ubuntu-latest', 'ubuntu-24.04-arm']
|
|
51 | 54 | build-macos:
|
52 | 55 | runs-on: macos-latest
|
53 | 56 |
|
| 57 | + permissions: |
| 58 | + contents: read |
| 59 | + |
54 | 60 | strategy:
|
55 | 61 | matrix:
|
56 | 62 | python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10', 'pypy3.11']
|
|
96 | 102 | build-windows:
|
97 | 103 | runs-on: windows-latest
|
98 | 104 |
|
| 105 | + permissions: |
| 106 | + contents: read |
| 107 | + |
99 | 108 | strategy:
|
100 | 109 | matrix:
|
101 | 110 | python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
@@ -137,11 +146,53 @@ jobs:
|
137 | 146 | tldr --version
|
138 | 147 | tldr tldr --markdown
|
139 | 148 |
|
| 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 | +
|
140 | 188 | build-snap:
|
141 | 189 | runs-on: ${{ matrix.os }}
|
142 | 190 | if: github.repository == 'tldr-pages/tldr-python-client' && github.ref == 'refs/heads/main'
|
143 | 191 | needs: ['build-linux']
|
144 | 192 |
|
| 193 | + permissions: |
| 194 | + contents: read |
| 195 | + |
145 | 196 | strategy:
|
146 | 197 | matrix:
|
147 | 198 | os: ['ubuntu-latest', 'ubuntu-24.04-arm']
|
|
0 commit comments