Skip to content

Fix broken tests in GitHub CI/CD #5

Fix broken tests in GitHub CI/CD

Fix broken tests in GitHub CI/CD #5

name: Tests (PyPA packages)
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
test:
strategy:
matrix:
include:
- python-version: "3.12"
os: "ubuntu-22.04"
extra-python-packages: python3.12-distutils
- python-version: "3.11"
os: "ubuntu-22.04"
- python-version: "3.10"
os: "ubuntu-22.04"
- python-version: "3.9"
os: "ubuntu-22.04"
- python-version: "3.8"
os: "ubuntu-22.04"
- python-version: "3.7"
os: "ubuntu-22.04"
- python-version: "3.6"
os: "ubuntu-20.04"
- python-version: "3.5"
os: "ubuntu-20.04"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Include ppa repository
run: sudo add-apt-repository ppa:deadsnakes/ppa
- name: Set up Python ${{ matrix.python-version }}
run: |
sudo apt-get install python${{ matrix.python-version }}-dev {{ matrix.extra-python-packages }}
sudo update-alternatives --install /usr/bin/python3 python3 `which python${{ matrix.python-version }}` 1
sudo update-alternatives --install /usr/bin/python3-config python3-config `which python${{ matrix.python-version }}-config` 1
- name: Upgrade setuptools for Python 3.12
if: matrix.python-version == '3.12'
run: |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py "setuptools > 69.0"
- name: Install requirements
run: python3 -m pip install -r requirements.txt
- name: Install requirements for testing
run: python3 -m pip install mockito
- name: Run tests
run: python3 -m unittest tests