CI: Fix workflow versions #397
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
# Don't abort if a matrix combination fails | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.10"] | |
browser: ["firefox", "chrome", "edge", "undetected_chrome"] | |
headless: [true] | |
exclude: | |
# For now, the edge setup on linux amd64 is not working (07/2024) | |
# See the issues below | |
# * https://github.com/browser-actions/setup-edge/issues/386 | |
# * https://github.com/browser-actions/setup-edge/issues/516 | |
- os: ubuntu-latest | |
browser: "edge" | |
- os: macos-latest | |
browser: "edge" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Test Dependencies | |
run: | | |
pip install -r test-requirements.txt | |
- name: Install Package | |
run: | | |
pip install . | |
- uses: browser-actions/setup-chrome@latest | |
if: matrix.browser == 'chrome' || matrix.browser == 'undetected_chrome' | |
with: | |
chrome-version: stable | |
- uses: browser-actions/setup-firefox@latest | |
if: matrix.browser == 'firefox' | |
- uses: browser-actions/setup-edge@latest | |
if: matrix.browser == 'edge' | |
- name: Run Tests in ${{ matrix.browser }} | |
if: matrix.browser == 'chrome' || matrix.browser == 'firefox' | |
run: | | |
pytest -n 2 -v -vrxs --headless=${{ matrix.headless }} --browser=${{ matrix.browser }} | |
- name: Run Tests in ${{ matrix.browser }} | |
if: matrix.browser == 'edge' || matrix.browser == 'undetected_chrome' | |
run: | | |
pytest -v -vrxs --headless=${{ matrix.headless }} --browser=${{ matrix.browser }} |