diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82e054f..be5fa63 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'] @@ -137,11 +146,53 @@ jobs: tldr --version tldr tldr --markdown + build-windows-arm: + runs-on: windows-11-arm + + permissions: + contents: read + + 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 tldr dependencies + run: + python3 -m pip install -r requirements.txt --user + + - 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' needs: ['build-linux'] + permissions: + contents: read + strategy: matrix: os: ['ubuntu-latest', 'ubuntu-24.04-arm']