-
-
Notifications
You must be signed in to change notification settings - Fork 111
50 lines (46 loc) · 1.46 KB
/
python-package.yml
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
name: Python package
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
env:
TOX_OVERRIDE: "testenv.pass_env+=XAUTHORITY,DISPLAY,TEST_BROWSER_NAME,TEST_BROWSER_PATH"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install tox
run: python -m pip install .[test]
- name: Install Brave
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https curl
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key add -
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt-get update
sudo apt-get install --yes brave-browser
- name: Run tests via tox (Chromium)
run: xvfb-run -- python -m tox -e py
- name: Run tests via tox (Brave)
env:
TEST_BROWSER_NAME: Brave
TEST_BROWSER_PATH: /usr/bin/brave-browser
run: xvfb-run -- python -m tox -e py
- if: "matrix.python-version == '3.12'"
name: Lint
run: python -m tox -e lint