1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-12-26 17:29:50 +00:00

Add workflow for GitHub Actions

This commit is contained in:
Mike Naberezny 2021-01-03 11:31:52 -08:00
parent eaa2398cec
commit cdec5df4ef
4 changed files with 30 additions and 34 deletions

25
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Run all tests
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Show Python version
run: python -V
- name: Run the tests
run: python setup.py test -q

View File

@ -1,22 +0,0 @@
language: python
sudo: false
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
dist: xenial # required for Python >= 3.7
- python: pypy
env: TOXENV=pypy
install:
# tox is pinned for python 3.4 support
- travis_retry pip install tox==3.14.0
script:
- travis_retry tox

View File

@ -48,7 +48,7 @@ else:
oldstdin = None
def get_unbuffered_stdin(stdin):
""" Attempt to get and return a copy of stdin that is
""" Attempt to get and return a copy of stdin that is
unbuffered. This allows for immediate response to typed input
as well as pasted input. If unable to get an unbuffered
version of stdin, return the original version.
@ -74,7 +74,7 @@ else:
def save_mode(stdin):
""" For operating systems that support it, save the original
input termios settings so they can be restored later. This
input termios settings so they can be restored later. This
allows us to switch to noncanonical mode when software is
running in the simulator and back to the original mode when
accepting commands.
@ -121,9 +121,9 @@ else:
# Quietly ignore termios errors, such as stdin not being
# a tty.
pass
def restore_mode():
"""For operating systems that support it, restore the previous
"""For operating systems that support it, restore the previous
input mode.
"""
@ -188,7 +188,7 @@ else:
pass
# Convert linefeeds to carriage returns.
if char != '' and ord(char) == 10:
if len(char) and ord(char) == 10:
char = '\r'
return char

View File

@ -1,7 +0,0 @@
[tox]
envlist =
py27,py34,py35,py36,py37,pypy
[testenv]
commands =
python setup.py test -q