Skip to content

Commit 1592fb6

Browse files
committed
Merge ../skeleton into test/common-yaml
2 parents 7a04492 + a47197a commit 1592fb6

File tree

1 file changed

+27
-38
lines changed

1 file changed

+27
-38
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,31 @@ env:
2828
TOX_OVERRIDE: >-
2929
testenv.pass_env+=GITHUB_*,FORCE_COLOR
3030
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
3156

3257
jobs:
3358
test:
@@ -55,28 +80,7 @@ jobs:
5580
runs-on: ${{ matrix.platform }}
5681
continue-on-error: ${{ matrix.python == '3.14' }}
5782
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
8084
- name: Run
8185
run: tox
8286

@@ -89,22 +93,7 @@ jobs:
8993
- docs
9094
runs-on: ubuntu-latest
9195
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
10897
- name: Eval ${{ matrix.job }}
10998
run: tox -e ${{ matrix.job }}
11099

0 commit comments

Comments
 (0)