Skip to content

Commit 38e784d

Browse files
committed
Trying out key value pairs on python version for more expressive matrix
1 parent 33135cf commit 38e784d

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/CI.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ jobs:
99
continue-on-error: true
1010
strategy:
1111
matrix:
12-
python-version: [3.9, 3.13.0] # pypy-3.9
12+
# python-version: [3.9, 3.13.0] # pypy-3.9
13+
python-version: [{earliest: 3.9}, {latest: 3.13.0}] # pypy-3.9
1314
rf-version: [6.1.1, 7.2.2, 7.3]
1415
selenium-version: [4.32.0, 4.33.0]
1516
browser: [firefox, chrome, headlesschrome] #edge
1617

1718
steps:
1819
- uses: actions/checkout@v4
19-
- name: Set up Python ${{ matrix.python-version }} with Robot Framework ${{ matrix.rf-version }}
20+
- name: Set up Python ${{ matrix.python-version.* }} with Robot Framework ${{ matrix.rf-version }}
2021
uses: actions/setup-python@v5
2122
with:
22-
python-version: ${{ matrix.python-version }}
23+
python-version: ${{ matrix.python-version.* }}
2324
- name: Setup Chrome
2425
uses: browser-actions/setup-chrome@latest
2526
with:
@@ -41,12 +42,12 @@ jobs:
4142
export DISPLAY=:99.0
4243
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
4344
- name: Install dependencies
44-
if: matrix.python-version != 'pypy-3.7'
45+
if: matrix.python-version.* != 'pypy-3.7'
4546
run: |
4647
python -m pip install --upgrade pip
4748
pip install -r requirements-dev.txt
4849
- name: Install dependencies for pypy
49-
if: matrix.python-version == 'pypy-3.9'
50+
if: matrix.python-version.* == 'pypy-3.9'
5051
run: |
5152
python -m pip install --upgrade pip
5253
pip install -r requirements.txt
@@ -64,19 +65,24 @@ jobs:
6465
echo "$SELENIUM_MANAGER_EXE"
6566
echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV"
6667
echo "$WEBDRIVERPATH"
67-
- name: Generate stub file for ${{ matrix.python-version }}
68-
if: matrix.python-version != 'pypy-3.9'
68+
- name: Generate stub file for ${{ matrix.python-version.* }}
69+
if: matrix.python-version.* != 'pypy-3.9'
6970
run: |
7071
invoke gen-stub
7172
7273
# Temporarily ignoring pypy execution
7374
- name: Run tests with headless Chrome and with PyPy
74-
if: startsWith( matrix.python-version, 'pypy') == true
75+
if: startsWith( matrix.python-version.*, 'pypy') == true
7576
run: |
7677
xvfb-run --auto-servernum python atest/run.py --nounit --zip headlesschrome
7778
78-
- name: Run tests with ${{ matrix.browser }} if CPython
79-
if: startsWith( matrix.python-version, 'pypy') == false
79+
# - name: Run tests with ${{ matrix.browser }} if CPython
80+
# if: startsWith( matrix.python-version, 'pypy') == false
81+
# run: |
82+
# xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.browser }}
83+
84+
- name: Run tests with latest python
85+
if: matrix.python-version == ${{ matrix.python.version.latest }}
8086
run: |
8187
xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.browser }}
8288

0 commit comments

Comments
 (0)