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: | npm ci --omit=dev || 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