Skip to content

Lock setuptools version #229

Lock setuptools version

Lock setuptools version #229

Workflow file for this run

name: Unittest
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
jobs:
test:
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: ['2.7', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-22.04, windows-2019, macos-14-arm64]
exclude:
- os: macos-14-arm64
python-version: "2.7"
- os: macos-14-arm64
python-version: "3.9"
- os: macos-14-arm64
python-version: "3.10"
- os: windows-2019
python-version: "3.9"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
if: matrix.python-version != '2.7' && matrix.python-version != '3.9'
with:
python-version: ${{ matrix.python-version }}
- name: Install Ubuntu Python 2.7
if: matrix.python-version == '2.7' && matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python2 python3-virtualenv
virtualenv -p python2 ${HOME}/cp27
${HOME}/cp27/bin/python -m pip install -U pip
${HOME}/cp27/bin/python -m pip install -U setuptools wheel
echo "${HOME}/cp27/bin" >> $GITHUB_PATH
- name: Install Windows Python 2.7
shell: cmd
if: matrix.python-version == '2.7' && matrix.os == 'windows-2019'
run: |
choco install wget --no-progress
wget -nv "https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi"
start /wait msiexec.exe /passive /i python-2.7.18.amd64.msi /norestart /L*V "python_install.log" ADDLOCAL=ALL ALLUSERS=1 TARGETDIR=c:\python27
type "python_install.log"
- name: Install Ubuntu Python 3.9
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-22.04'
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa -y && sudo apt-get update
sudo apt-get install -y python3.9 python3.9-distutils
wget https://bootstrap.pypa.io/pip/get-pip.py && python3.9 get-pip.py
mkdir ${HOME}/.bin
ln -s $(which python3.9) "${HOME}/.bin/python"
echo "${HOME}/.bin" >> $GITHUB_PATH
- name: Install Dependencies
run: |
python -m pip install --upgrade pip pytest pytest-cov codecov mock
pip install -r requirements.txt
- name: Run Tests
run: |
python -m pytest tests/ --cov=testbase --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-qtaf
path_to_write_report: ./coverage/codecov_report.txt
verbose: true