PY3 compat #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Sippers Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
# You can use PyPy versions in python-version. | |
# For example, pypy2 and pypy3 | |
matrix: | |
python-version: ["2.7", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
if: matrix.python-version == '3.11' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python 2 | |
if: matrix.python-version == '2.7' | |
run: | | |
sudo apt update | |
sudo apt install python2 python2-dev | |
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | |
sudo python2 get-pip.py | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 | |
printf '1\n' | sudo update-alternatives --config python | |
- name: Upgrade pip | |
run: | | |
pip install --upgrade pip setuptools wheel | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install . | |
- name: Run test | |
if: matrix.python-version == '2.7' | |
run: | | |
python setup.py test | |
- name: Run test | |
if: matrix.python-version == '3.11' | |
run: | | |
python -m unittest discover -v | |