Run pytest on Ubuntu #982
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: pytest-ubuntu | |
run-name: Run pytest on Ubuntu | |
on: | |
push: | |
branches: 'main' | |
pull_request: | |
jobs: | |
pytest: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.12"] | |
name: pytest-ubuntu-python-${{ matrix.python-version }} | |
container: | |
image: ubuntu:latest | |
volumes: | |
- /home/actions/oiejq:/github/home/.local/bin | |
env: | |
DEB_PYTHON_INSTALL_LAYOUT: deb | |
DEBIAN_FRONTEND: noninteractive | |
TZ: Europe/Warsaw | |
options: | |
--privileged | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare system | |
run: | | |
apt update | |
apt install -y sqlite3 sqlite3-doc build-essential dpkg texlive-latex-extra ghostscript git | |
sysctl kernel.perf_event_paranoid=-1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip3 install .[tests] | |
apt install -y time | |
- name: Run pytest | |
env: | |
PYTEST_ADDOPTS: "--color=yes" | |
run: | | |
python3 -m pytest -v -n $((`nproc` / 2)) |