qutebrowser/.github/workflows/ci.yml

132 lines
3.9 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
linters:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testenv:
- pylint
- flake8
- mypy
- docs
- vulture
- misc
- pyroma
- check-manifest
- eslint
- shellcheck
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/setup-node@v1
with:
node-version: '12.x'
if: "matrix.testenv == 'eslint'"
- name: Set up problem matchers
run: "python3 scripts/dev/ci/problemmatchers.py ${{ matrix.testenv }}"
- name: Install dependencies
run: "bash scripts/dev/ci/install.sh ${{ matrix.testenv }}"
- name: "Run ${{ matrix.testenv }}"
run: "bash scripts/dev/ci/run.sh ${{ matrix.testenv }}"
tests-docker:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
image:
- archlinux-webkit
- archlinux-webengine
# - archlinux-webengine-unstable
container:
image: "qutebrowser/ci:${{ matrix.image }}"
env:
QUTE_BDD_WEBENGINE: "${{ matrix.image != 'archlinux-webkit' }}"
DOCKER: "${{ matrix.image }}"
CI: true
PYTEST_ADDOPTS: "--color=yes"
options: --privileged --tty
steps:
- uses: actions/checkout@v2
- run: tox -e py38
tests:
strategy:
fail-fast: false
matrix:
include:
### PyQt 5.7.1 (Python 3.5)
# FIXME: Flaky tests / segfault on exit?
- testenv: py35-pyqt57
os: ubuntu-16.04
python: 3.5
- testenv: py35-pyqt57
os: ubuntu-18.04
python: 3.5
### PyQt 5.9 (Python 3.6)
- testenv: py36-pyqt59
os: ubuntu-20.04
python: 3.6
### PyQt 5.10 (Python 3.6)
- testenv: py36-pyqt510
os: ubuntu-20.04
python: 3.6
### PyQt 5.11 (Python 3.7)
- testenv: py37-pyqt511
os: ubuntu-20.04
python: 3.7
### PyQt 5.12 (Python 3.8)
- testenv: py38-pyqt512
os: ubuntu-20.04
python: 3.8
### PyQt 5.13 (Python 3.8)
- testenv: py38-pyqt513
os: ubuntu-20.04
python: 3.8
### PyQt 5.14 (Python 3.8)
- testenv: py38-pyqt514
os: ubuntu-20.04
python: 3.8
### PyQt 5.15 (Python nightly)
- testenv: py3-pyqt515
os: ubuntu-20.04
python: 3.10-dev
### PyQt 5.15 (Python 3.8, with coverage)
- testenv: py38-pyqt515-cov
os: ubuntu-20.04
python: 3.8
### TODO: macOS
### TODO: Windows
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
if: "!endsWith(matrix.python, '-dev')"
with:
python-version: "${{ matrix.python }}"
- name: Set up development Python
uses: deadsnakes/action@v1.0.0
if: "endsWith(matrix.python, '-dev')"
with:
python-version: "${{ matrix.python }}"
- name: Install apt dependencies
run: sudo apt install libyaml-dev libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0
- name: Install dependencies
run: "bash scripts/dev/ci/install.sh ${{ matrix.testenv }}"
- name: "Run ${{ matrix.testenv }}"
env:
PYTEST_ADDOPTS: "--color=yes"
run: "bash scripts/dev/ci/run.sh ${{ matrix.testenv }}"
- name: Upload coverage
if: "endsWith(matrix.testenv, '-cov')"
uses: codecov/codecov-action@v1
with:
name: "${{ matrix.testenv }}"
fail_ci_if_error: true