Skip to content

Commit f5f1d2b

Browse files
CI: modernize release pipeline and refresh GitHub Actions versions (#727)
* ci: modernize release workflow (python -m build) and update GitHub Actions versions * bump uv deps
1 parent 8433db7 commit f5f1d2b

4 files changed

Lines changed: 145 additions & 152 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ jobs:
77
deploy:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- name: Set up Python 3.7
12-
uses: actions/setup-python@v4
10+
- uses: actions/checkout@v6
11+
- name: Set up Python 3.12
12+
uses: actions/setup-python@v6
1313
with:
14-
python-version: 3.7
14+
python-version: 3.12
1515
- name: Install Python dependencies
1616
run: |
1717
python -m pip install -U pip
1818
pip install pipenv
1919
pipenv install --dev
20+
pip install build
2021
- name: Build dist
2122
run: |
22-
pipenv run python setup.py sdist bdist_wheel
23+
python -m build
2324
2425
- name: Publish package
25-
uses: pypa/gh-action-pypi-publish@release/v1
26+
uses: pypa/gh-action-pypi-publish@v1
2627
with:
2728
user: __token__
2829
password: ${{ secrets.pypi_password }}

.github/workflows/test.yml

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ on:
3636
- setup.py
3737
- webdriver_manager/__init__.py
3838

39+
permissions:
40+
contents: read
41+
id-token: write
42+
3943
jobs:
4044
test:
4145
runs-on: ${{ matrix.os }}
@@ -44,24 +48,24 @@ jobs:
4448
strategy:
4549
fail-fast: false
4650
matrix:
47-
python-version: ['3.11']
51+
python-version: ['3.12']
4852
selenium-version: ['4.10.0']
4953
os: [ windows-latest ]
5054
wdm-log: ['']
5155
include:
52-
- python-version: '3.11'
56+
- python-version: '3.12'
5357
selenium-version: '4.10.0'
5458
os: ubuntu-latest
55-
- python-version: '3.11'
59+
- python-version: '3.12'
5660
selenium-version: '4.10.0'
5761
os: macos-latest
5862
wdm-log: '0'
5963

6064
steps:
61-
- uses: actions/checkout@v3
65+
- uses: actions/checkout@v6
6266

6367
- name: Set up Python ${{ matrix.python-version }}
64-
uses: actions/setup-python@v4
68+
uses: actions/setup-python@v5
6569
with:
6670
python-version: ${{ matrix.python-version }}
6771

@@ -147,11 +151,57 @@ jobs:
147151
pipenv run py.test -s -o console_output_style=progress -o log_cli=false -v --cov-config .coveragerc --cov-report xml --cov-report term:skip-covered --cov=webdriver_manager --tb=short tests/
148152
149153
- name: Codecov Upload
150-
uses: codecov/codecov-action@v3
154+
uses: codecov/codecov-action@v5
151155
if: always()
152156
with:
153157
file: ./coverage.xml
154158
name: ${{ matrix.os }}-py${{ matrix.python-version }}
159+
use_oidc: true
160+
161+
test-future-python:
162+
continue-on-error: true
163+
runs-on: ubuntu-latest
164+
env:
165+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166+
strategy:
167+
fail-fast: false
168+
matrix:
169+
python-version: [ '3.14', '3.15.0-beta.1' ]
170+
allow-prereleases: true
171+
selenium-version: [ '4.10.0' ]
172+
173+
steps:
174+
- uses: actions/checkout@v6
175+
176+
- name: Set up Python ${{ matrix.python-version }}
177+
uses: actions/setup-python@v6
178+
with:
179+
python-version: ${{ matrix.python-version }}
180+
allow-prereleases: true
181+
182+
- name: Install browsers on Linux
183+
run: |
184+
sudo apt-get update
185+
sudo apt-get install -y software-properties-common apt-transport-https wget curl xvfb
186+
187+
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
188+
sudo dpkg -i google-chrome-stable_current_amd64.deb
189+
190+
- name: Install Python dependencies
191+
run: |
192+
python -m pip install -U pip wheel
193+
pip install pipenv
194+
pipenv install --dev --skip-lock --python=${{ matrix.python-version }}
195+
pipenv install selenium==${{ matrix.selenium-version }}
196+
197+
- name: Run tests on Linux (future Python, non-blocking)
198+
run: |
199+
xvfb-run -a pipenv run py.test -s \
200+
-o console_output_style=progress \
201+
-o log_cli=false \
202+
-v \
203+
--tb=short \
204+
tests/
155205
156206
test-negative:
157207
runs-on: ${{ matrix.os }}
@@ -165,10 +215,10 @@ jobs:
165215
os: [ ubuntu-latest ]
166216

167217
steps:
168-
- uses: actions/checkout@v3
218+
- uses: actions/checkout@v6
169219

170220
- name: Set up Python ${{ matrix.python-version }}
171-
uses: actions/setup-python@v4
221+
uses: actions/setup-python@v6
172222
with:
173223
python-version: ${{ matrix.python-version }}
174224

@@ -206,8 +256,9 @@ jobs:
206256
tests_negative/
207257
208258
- name: Codecov Upload
209-
uses: codecov/codecov-action@v3
259+
uses: codecov/codecov-action@v5
210260
if: always()
211261
with:
212262
file: ./coverage.xml
213263
name: ${{ matrix.os }}-py${{ matrix.python-version }}
264+
use_oidc: true

.github/workflows/test_xdist.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
python-version: ['3.10']
48-
selenium-version: ['4.1.0']
47+
python-version: ['3.12']
48+
selenium-version: ['4.10.0']
4949
os: [ ubuntu-latest ]
5050

5151
steps:
52-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v6
5353

5454
- name: Set up Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v4
55+
uses: actions/setup-python@v5
5656
with:
5757
python-version: ${{ matrix.python-version }}
5858

5959
- name: Install browsers on Linux
6060
if: runner.os == 'Linux'
6161
run: |
6262
sudo apt-get update
63-
sudo apt-get install software-properties-common apt-transport-https wget curl
63+
sudo apt-get install -y software-properties-common apt-transport-https wget curl xvfb
6464
6565
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
6666
sudo dpkg -i google-chrome-stable_current_amd64.deb
@@ -75,12 +75,8 @@ jobs:
7575
7676
- name: Run tests on Linux (with xvfb)
7777
if: runner.os == 'Linux'
78-
uses: coactions/setup-xvfb@v1
79-
env:
80-
WDM_LOG: ${{ matrix.wdm-log }}
81-
with:
82-
run: |
83-
pipenv run pytest -sv tests_xdist/ -n 3
78+
run: |
79+
xvfb-run -a pipenv run pytest -sv tests_xdist/ -n 3
8480
8581
- name: List folders
86-
run: ls -la ~/.wdm
82+
run: ls -la ~/.wdm

0 commit comments

Comments
 (0)