Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken tests in GitHub CI/CD #34

Merged
merged 2 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/test-pypa-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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"
- 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 }}
env:
GET_PIP_PATH_PREFIX: ${{ contains(fromJSON('["3.7", "3.6", "3.5"]'), matrix.python-version) && format('pip/{0}/', matrix.python-version) || '' }}
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
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: Install disutils package
if: contains(fromJSON('["3.5"]'), matrix.python-version) == false
run: sudo apt-get install python${{ matrix.python-version }}-distutils

- name: Download get-pip.py
run: curl https://bootstrap.pypa.io/${{ env.GET_PIP_PATH_PREFIX }}get-pip.py -o get-pip.py

- name: Install pip
run: python3 get-pip.py

# TODO: try to remove this after unpining redis
- name: Install setuptools
if: contains(fromJSON('["3.12"]'), matrix.python-version)
run: python3 get-pip.py "setuptools"

- 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
33 changes: 33 additions & 0 deletions .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests (Ubuntu packages)

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"

jobs:
test:
strategy:
matrix:
os: ["ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Python
run: sudo apt-get install python3
- name: Install requirements
run: sudo apt-get install python3-redis python3-hiredis python3-requests python3-zmq
- name: Install requirements for testing (from PyPA)
if: matrix.os == 'ubuntu-20.04'
run: python3 -m pip install mockito
- name: Install requirements for testing (from Ubuntu packages)
if: matrix.os != 'ubuntu-20.04'
run: sudo apt-get install python3-mockito
- name: Run tests
run: python3 -m unittest tests
21 changes: 0 additions & 21 deletions .github/workflows/test.yml

This file was deleted.

Loading