-
Notifications
You must be signed in to change notification settings - Fork 14
78 lines (74 loc) · 1.97 KB
/
selenium.yaml
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
name: Referer Mod
on:
pull_request:
push:
branches:
- '**'
- '!dependabot/**'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
test-requirements.txt
- name: Install Selenium
run: |
pip install -r test-requirements.txt
- name: Build add-on archive
run: |
make dist
- name: Build testenv container images
run: |
docker compose build
working-directory: testserver/
- name: Start test environment
run: |
docker compose up -d
working-directory: testserver/
- name: Check if proxy and servers work
run: |
curl -v --fail --retry 3 --retry-connrefused --output - --proxy http://localhost:8080 http://www.x.test/ http://site.y.test/ >/dev/null
- name: Run add-on test
run: |
python -u test.py -v
- name: Show test environment logs
if: '${{ !cancelled() }}'
run: |
docker compose logs
working-directory: testserver/
- name: Stop test environment
if: '${{ always() }}'
run: |
docker compose down
working-directory: testserver/
eslint:
name: ESLint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install ESLint
run: npm install eslint
- name: Run ESLint
run: npx eslint .
web-ext-lint:
name: web-ext lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install web-ext
run: npm install web-ext
- name: Run web-ext
run: npx web-ext lint --warnings-as-errors