Update tox #182
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |