Skip to content

Commit f21490e

Browse files
committed
Merge ../skeleton into test/common
2 parents 7a04492 + 063eea0 commit f21490e

File tree

2 files changed

+46
-43
lines changed

2 files changed

+46
-43
lines changed

.github/actions/common/action.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Common Steps"
2+
runs:
3+
using: "composite"
4+
steps:
5+
- name: Install build dependencies
6+
# Install dependencies for building packages on pre-release Pythons
7+
# jaraco/skeleton#161
8+
if: matrix.python == '3.14' && matrix.platform == 'ubuntu-latest'
9+
run: |
10+
sudo apt update
11+
sudo apt install -y libxml2-dev libxslt-dev
12+
shell: bash
13+
- name: Enable unprivileged ping sockets
14+
# actions/runner-images#11614
15+
if: matrix.platform == 'ubuntu-latest'
16+
shell: bash
17+
run: |
18+
echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf
19+
sudo sysctl -p
20+
- name: Setup Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python }}
24+
allow-prereleases: true
25+
- name: Install tox
26+
run: python -m pip install tox
27+
shell: bash
28+
- name: Run
29+
run: tox
30+
shell: bash

.github/workflows/main.yml

Lines changed: 16 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -55,30 +55,9 @@ jobs:
5555
runs-on: ${{ matrix.platform }}
5656
continue-on-error: ${{ matrix.python == '3.14' }}
5757
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
80-
- name: Run
81-
run: tox
58+
- uses: actions/checkout@v4
59+
- name: Common
60+
uses: ./.github/actions/common
8261

8362
collateral:
8463
strategy:
@@ -87,26 +66,20 @@ jobs:
8766
job:
8867
- diffcov
8968
- docs
90-
runs-on: ubuntu-latest
69+
python:
70+
- "3.x"
71+
platform:
72+
- ubuntu-latest
73+
env:
74+
TOX_ENV: ${{ matrix.job }}
75+
runs-on: ${{ matrix.platform }}
76+
continue-on-error: ${{ matrix.python == '3.14' }}
9177
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
108-
- name: Eval ${{ matrix.job }}
109-
run: tox -e ${{ matrix.job }}
78+
- uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0
81+
- name: Common
82+
uses: ./.github/actions/common
11083

11184
check: # This job does nothing and is only used for the branch protection
11285
if: always()

0 commit comments

Comments
 (0)