Skip to content

build

build #120

Workflow file for this run

# NB: this name is used in the status badge, where we want to see "build: passing"
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch: # allow manual triggering from GitHub UI
schedule:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday
jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Git clone
uses: actions/checkout@v3
- name: Install Ubuntu dependencies
run: |
sudo apt update
sudo apt install git pkg-config qt6-base-dev-tools qt6-documentation-tools qt6-qpa-plugins \
libxcb-cursor0 xvfb
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install -U pip
python -m pip install -U hatchling hatch-vcs markdown2 pytest \
pytest-cov pytest-xdist linkchecker PyQt6 PyQt6-QScintilla
- name: Run tests
run: |
python -m hatchling build --hooks-only
xvfb-run --auto-servernum python -m pytest -vras --cov=linkcheck_gui
- name: Report to coveralls
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
lint:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest
strategy:
matrix:
toxenv:
- flake8
- check-python-versions
- pylint
- yamllint
steps:
- name: Git clone
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U tox
- name: Run ${{ matrix.toxenv }}
run: python -m tox -e ${{ matrix.toxenv }}