forked from radik/pbs-python
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.67 KB
/
python-package-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies for Python build
run: |
dnf install -y dnf-plugins-core
dnf install -y gcc openssl openssl-devel bzip2-devel libffi-devel zlib-devel make wget curl-minimal
dnf install -y git
- name: Download and Install Python 3.10 from Source
run: |
PYTHON_VERSION=3.10.12
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz
tar -xzf Python-$PYTHON_VERSION.tgz
cd Python-$PYTHON_VERSION
./configure --enable-optimizations
make -j $(nproc)
make altinstall # This installs it as `python3.10` without overwriting the default `python3`
ln -s /usr/local/bin/python3.10 /usr/local/bin/python # Link it as `python`
- name: Verify Python and SSL module
run: |
python --version
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
dnf install -y compat-openssl11
- name: Upgrade pip and install dependencies
run: |
python3.10 -m pip install ".[all]"
- name: Unit tests
run: |
python3.10 -m unittest discover --verbose --catch --start-directory tests/unit