Skip to content

Increase minimum Python version to 3.9 #47

Increase minimum Python version to 3.9

Increase minimum Python version to 3.9 #47

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2024 igo95862
---
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
linters:
name: Run source code linters
runs-on: ubuntu-latest
container:
image: docker.io/archlinux:latest
steps:
- name: Install linters
run: |
pacman --noconfirm -Syu \
reuse python-pyflakes python-black \
python-isort mypy codespell git
- name: Checkout
uses: actions/checkout@v4
- name: Add safe git directory
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run linters
run: |
python3 tools/run_linters.py
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt install python3 python3-pip
- name: Build wheels with container
run: |
python3 tools/build_in_container.py
- name: Disable namespaces restrictions
run: |
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Install in venv and run tests
run: |
python3 -m venv --system-site-packages venv
venv/bin/pip3 install dist/*.whl
venv/bin/python3 -m unittest --verbose