Use contextlib2 on Python 2 #117
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
name: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.10" | |
- "3.12" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install setuptools | |
- run: pip install readme_renderer | |
- name: Install SSH | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq openssh-client openssh-server | |
- name: Set up SSH | |
run: .ci/setup_ssh.sh | |
- run: pip install -e . | |
- run: SCPPY_PORT=10022 python test.py | |
- run: python setup.py check -r -s | |
build-container: | |
strategy: | |
matrix: | |
python-version: | |
- "2.7" | |
- "3.5" | |
runs-on: ubuntu-latest | |
container: | |
image: python:${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install SSH | |
run: | | |
apt-get update -qq | |
apt-get install -qq openssh-client openssh-server | |
- run: pip install setuptools | |
- run: pip install contextlib2 | |
if: ${{ startsWith(matrix.python-version, '2.') }} | |
- name: Set up SSH | |
run: .ci/setup_ssh.sh | |
- run: pip install -e . | |
- run: SCPPY_PORT=10022 python test.py |