Skip to content

chore: setup for almalinux in GH WF x 3 #123

chore: setup for almalinux in GH WF x 3

chore: setup for almalinux in GH WF x 3 #123

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: |
dnf install -y epel-release
dnf install -y torque torque-client torque-devel torque-drmaa torque-mom torque-server torque-scheduler
bash -c 'python -m pip install --upgrade pip'
bash -c 'python -m pip install --upgrade setuptools wheel'
bash -c 'pip install ".[all]"'
- name: Unit tests
run: |
bash -c 'python -m unittest discover --verbose --catch --start-directory tests/unit'