Debian Codegraph @

.github/workflows/test.yml

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