File: tests.yml

package info (click to toggle)
python-pipx 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: python: 9,813; makefile: 17; sh: 7
file content (96 lines) | stat: -rw-r--r-- 2,880 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: ๐Ÿงช tests

on:
  workflow_dispatch:
  push:
    branches:
      - "main"
  pull_request:
  schedule:
    - cron: "0 8 * * *"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: ๐Ÿงช test ${{ matrix.py }} - ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    timeout-minutes: 40
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-24.04]
        py: ["3.13", "3.12", "3.11", "3.10", "3.9"]
        include:
          - os: windows-2025
            py: "3.13"
          - os: macos-15
            py: "3.13"

    steps:
      - name: ๐Ÿ“ฅ Checkout code
        uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - name: ๐Ÿš€ Install uv
        uses: astral-sh/setup-uv@v7
      - name: ๐Ÿ Setup Python ${{ matrix.py }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.py }}
      - name: ๐Ÿ“ฆ Install tox
        run: uv tool install --python-preference only-managed --python 3.13 "tox>=4.45" --with tox-uv
      - name: Persistent .pipx_tests/package_cache
        uses: actions/cache@v5
        with:
          path: ${{ github.workspace }}/.pipx_tests/package_cache/${{ matrix.py }}
          key: pipx-tests-package-cache-${{ runner.os }}-${{ matrix.py }}
      - name: ๐Ÿ—๏ธ Setup test suite
        run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
      - name: ๐Ÿ“ฆ Seed package cache
        run: tox exec -e ${{ matrix.py }} -- python scripts/update_package_cache.py testdata/tests_packages .pipx_tests/package_cache/
      - name: ๐Ÿƒ Run test suite
        run: tox run --skip-pkg-install -e ${{ matrix.py }}
        timeout-minutes: 30
        env:
          PYTEST_ADDOPTS: "-vv --durations=20"

  man:
    name: ๐Ÿ“– Build man page
    runs-on: ubuntu-24.04
    steps:
      - name: ๐Ÿ“ฅ Checkout code
        uses: actions/checkout@v6
      - name: ๐Ÿš€ Install uv
        uses: astral-sh/setup-uv@v7
      - name: ๐Ÿ“ฆ Install tox
        run: uv tool install --python-preference only-managed --python 3.13 "tox>=4.45" --with tox-uv
      - name: ๐Ÿ“– Build man page
        run: tox run -e man
      - name: Show man page
        run: man -l pipx.1

  zipapp:
    name: ๐Ÿ“ฆ Build zipapp
    runs-on: ubuntu-24.04
    steps:
      - name: ๐Ÿ“ฅ Checkout code
        uses: actions/checkout@v6
      - name: ๐Ÿ Setup Python 3.9
        uses: actions/setup-python@v6
        with:
          python-version: "3.9"
      - name: ๐Ÿ“ฆ Build zipapp
        run: |
          pip install shiv
          shiv -c pipx -o ./pipx.pyz .
          ./pipx.pyz --version
      - name: Test zipapp by installing black
        run: python ./pipx.pyz install black
      - uses: actions/upload-artifact@v7
        with:
          name: pipx.pyz
          path: pipx.pyz
          retention-days: 3