1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
name: Tests
on:
push:
branches:
- master
- mv3-chrome
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Run ESLint
run: |
# "--production" to skip installing devDependencies modules
npm ci --production || exit 1
make lint
selenium:
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
job: [firefox, firefox-beta, firefox-nightly, firefox-esr, edge, edge-beta]
include:
- job: firefox
BROWSER: "firefox"
BROWSER_VERSION: "latest"
- job: firefox-beta
BROWSER: "firefox"
BROWSER_VERSION: "latest-beta"
- job: firefox-nightly
BROWSER: "firefox"
BROWSER_VERSION: "latest-nightly"
- job: firefox-esr
BROWSER: "firefox"
BROWSER_VERSION: "latest-esr"
- job: edge
BROWSER: "microsoft-edge"
BROWSER_VERSION: "stable"
- job: edge-beta
BROWSER: "microsoft-edge-beta"
BROWSER_VERSION: "beta"
env:
BROWSER: ${{ matrix.BROWSER }}
name:
${{ matrix.job }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install Python dependencies
run: pip install -r tests/requirements.txt
- name: Set up Firefox
if: ${{ matrix.BROWSER == 'firefox' }}
uses: browser-actions/setup-firefox@v1
with:
firefox-version: ${{ matrix.BROWSER_VERSION }}
- name: Install Geckodriver
if: ${{ matrix.BROWSER == 'firefox' }}
run: ./scripts/geckodriver.sh
- name: Set up Edge
if: ${{ contains(matrix.BROWSER, 'microsoft-edge') }}
uses: browser-actions/setup-edge@v1
with:
edge-version: ${{ matrix.BROWSER_VERSION }}
- name: Install Edge WebDriver
if: ${{ contains(matrix.BROWSER, 'microsoft-edge') }}
run: ./scripts/edge_webdriver.sh "$BROWSER"
- name: Install Xvfb
run: sudo apt-get install -y xvfb
- name: Run Selenium tests
run: |
type "$BROWSER" >/dev/null 2>&1 || {
echo "$BROWSER seems to be missing!"
exit 1
}
echo "Found $("$BROWSER" --version)"
xvfb-run --auto-servernum pytest --capture=no --color=yes --verbose --durations=10 tests/selenium
|