Skip to content

chore: setup for almalinux in GH WF #121

chore: setup for almalinux in GH WF

chore: setup for almalinux in GH WF #121

name: Python package tests
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
container-name:
# - centos/python-38-centos7
- almalinux/latest
container:
image: ${{ matrix.container-name }}
options: --user root
steps:
- name: Setup Container
run: |
# FROM almalinux:latest
dnf install -y gcc make git zlib-devel bzip2 bzip2-devel readline-devel \
sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils \
which && \
dnf clean all
# Set environment variables for pyenv
export HOME=/root
export PYENV_ROOT=$HOME/.pyenv
export PATH=$PYENV_ROOT/bin:$PATH
git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT && \
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $HOME/.bashrc && \
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $HOME/.bashrc && \
echo 'eval "$(pyenv init --path)"' >> $HOME/.bashrc
# Install Python 3.10.12 with pyenv
/root/.pyenv/bin/pyenv install 3.10.12 && \
/root/.pyenv/bin/pyenv global 3.10.12
- uses: actions/checkout@v2
- name: Install dependencies
run: |
rpm -ivh ${{ secrets.FILESERVER_URL }}/centos/7.9.2009/exabyte/x86_64/Packages/torque-6.0.0.1-1.adaptive.el7.centos.x86_64.rpm
rpm -ivh ${{ secrets.FILESERVER_URL }}/centos/7.9.2009/exabyte/x86_64/Packages/torque-devel-6.0.0.1-1.adaptive.el7.centos.x86_64.rpm
bash -c 'python -m pip install pip==20.3.4 # Install a version of pip which understands python_requires, to support py 2'
bash -c 'python -m pip install --upgrade pip'
bash -c 'python -m pip install --upgrade setuptools wheel'
bash -c 'pip install -r requirements-dev.txt --no-deps --no-build-isolation'
- name: Unit tests
run: |
bash -c 'python -m unittest discover --verbose --catch --start-directory tests/unit'