|
28 | 28 | TOX_OVERRIDE: >- |
29 | 29 | testenv.pass_env+=GITHUB_*,FORCE_COLOR |
30 | 30 |
|
| 31 | +shared_steps: &common_steps |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + fetch-depth: 0 |
| 35 | + - name: Install build dependencies |
| 36 | + # Install dependencies for building packages on pre-release Pythons |
| 37 | + # jaraco/skeleton#161 |
| 38 | + if: matrix.python == '3.14' && matrix.platform == 'ubuntu-latest' |
| 39 | + run: | |
| 40 | + sudo apt update |
| 41 | + sudo apt install -y libxml2-dev libxslt-dev |
| 42 | + - name: Enable unprivileged ping sockets |
| 43 | + # actions/runner-images#11614 |
| 44 | + if: matrix.platform == 'ubuntu-latest' |
| 45 | + shell: bash |
| 46 | + run: | |
| 47 | + echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf |
| 48 | + sudo sysctl -p |
| 49 | + - name: Setup Python |
| 50 | + uses: actions/setup-python@v4 |
| 51 | + with: |
| 52 | + python-version: ${{ matrix.python || '3.x' }} # Default to 3.x if matrix.python is not defined |
| 53 | + allow-prereleases: ${{ matrix.python != null && matrix.python != '3.x' }} |
| 54 | + - name: Install tox |
| 55 | + run: python -m pip install tox |
31 | 56 |
|
32 | 57 | jobs: |
33 | 58 | test: |
|
55 | 80 | runs-on: ${{ matrix.platform }} |
56 | 81 | continue-on-error: ${{ matrix.python == '3.14' }} |
57 | 82 | steps: |
58 | | - - uses: actions/checkout@v4 |
59 | | - - name: Install build dependencies |
60 | | - # Install dependencies for building packages on pre-release Pythons |
61 | | - # jaraco/skeleton#161 |
62 | | - if: matrix.python == '3.14' && matrix.platform == 'ubuntu-latest' |
63 | | - run: | |
64 | | - sudo apt update |
65 | | - sudo apt install -y libxml2-dev libxslt-dev |
66 | | - - name: Enable unprivileged ping sockets |
67 | | - # actions/runner-images#11614 |
68 | | - if: matrix.platform == 'ubuntu-latest' |
69 | | - shell: bash |
70 | | - run: | |
71 | | - echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf |
72 | | - sudo sysctl -p |
73 | | - - name: Setup Python |
74 | | - uses: actions/setup-python@v4 |
75 | | - with: |
76 | | - python-version: ${{ matrix.python }} |
77 | | - allow-prereleases: true |
78 | | - - name: Install tox |
79 | | - run: python -m pip install tox |
| 83 | + - *common_steps |
80 | 84 | - name: Run |
81 | 85 | run: tox |
82 | 86 |
|
|
89 | 93 | - docs |
90 | 94 | runs-on: ubuntu-latest |
91 | 95 | steps: |
92 | | - - uses: actions/checkout@v4 |
93 | | - with: |
94 | | - fetch-depth: 0 |
95 | | - - name: Enable unprivileged ping sockets |
96 | | - # actions/runner-images#11614 |
97 | | - if: matrix.platform == 'ubuntu-latest' |
98 | | - shell: bash |
99 | | - run: | |
100 | | - echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf |
101 | | - sudo sysctl -p |
102 | | - - name: Setup Python |
103 | | - uses: actions/setup-python@v4 |
104 | | - with: |
105 | | - python-version: 3.x |
106 | | - - name: Install tox |
107 | | - run: python -m pip install tox |
| 96 | + - *common_steps |
108 | 97 | - name: Eval ${{ matrix.job }} |
109 | 98 | run: tox -e ${{ matrix.job }} |
110 | 99 |
|
|
0 commit comments