Selenium Python - CI/CD Integration
You want to run Selenium Python tests on multiple Python versions (3.10, 3.11, 3.12) using GitHub Actions. Which YAML snippet correctly sets up this matrix testing?
Ajobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: 3.10, 3.11, 3.12
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install selenium
- name: Run tests
run: python test_suite.py
Bjobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: [3.10, 3.11, 3.12]
- name: Install dependencies
run: pip install selenium
- name: Run tests
run: python test_suite.py
Cjobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install selenium
- name: Run tests
run: python test_suite.py
Djobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10 3.11 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install selenium
- name: Run tests
run: python test_suite.py
