Skip to content

chore: setup for almalinux in GH WF x 17 #137

chore: setup for almalinux in GH WF x 17

chore: setup for almalinux in GH WF x 17 #137

name: Python package tests
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
container-name:
- almalinux:9
container:
image: ${{ matrix.container-name }}
steps:
- name: Install bash and dependencies
# Use `sh` to install `bash` since `bash` may not be available initially
shell: sh
run: |
dnf install -y bash dnf-plugins-core
dnf install -y gcc openssl openssl-devel bzip2-devel libffi-devel \
zlib-devel make wget curl-minimal git
echo "Bash installed at: $(command -v bash)"
- name: Checkout code
uses: actions/checkout@v4
- name: Install pyenv
shell: bash
run: |
curl https://pyenv.run | bash
echo "export PYENV_ROOT=\"${HOME}/.pyenv\"" >> $GITHUB_ENV
echo "export PATH=\"${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH\"" >> $GITHUB_ENV
- name: Set up pyenv environment
shell: bash
env:
PATH: "${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH"
run: |
# Initialize pyenv
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
- name: Install Python 3.10 with pyenv
shell: bash
env:
PATH: "${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH"
run: |
pyenv install 3.10.12
pyenv global 3.10.12
python --version
- name: Verify Python SSL support
shell: bash
env:
PATH: "${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH"
run: |
python -c "import ssl; print('SSL support is available:', ssl.OPENSSL_VERSION)"
- name: Install Torque
run: |
dnf install -y epel-release
dnf install -y torque torque-client torque-devel torque-drmaa torque-mom torque-server torque-scheduler
- name: Install dependencies
shell: bash
env:
PATH: "${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH"
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install ".[all]"
- name: Unit tests
shell: bash
env:
PATH: "${HOME}/.pyenv/bin:${HOME}/.pyenv/shims:$PATH"
run: |
python -m unittest discover --verbose --catch --start-directory tests/unit