Skip to content

Commit 0a332ba

Browse files
authored
Merge pull request #93 from afshin/github-actions
Switch to GitHub Actions
2 parents a2bc64d + 744393a commit 0a332ba

File tree

5 files changed

+63
-49
lines changed

5 files changed

+63
-49
lines changed

.github/workflows/test.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: "*"
5+
pull_request:
6+
branches: "*"
7+
jobs:
8+
test:
9+
runs-on: ${{ matrix.os }}-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu, windows]
14+
python-version: ["3.6", "3.8", "3.9"]
15+
exclude:
16+
# https://github.com/spyder-ide/pywinpty/issues/134
17+
- os: windows
18+
python-version: "3.9"
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v1
22+
- name: Install Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
architecture: "x64"
27+
- name: Upgrade packaging dependencies
28+
run: |
29+
pip install --upgrade pip setuptools wheel --user
30+
- name: Get pip cache dir
31+
id: pip-cache
32+
run: |
33+
echo "::set-output name=dir::$(pip cache dir)"
34+
- name: Cache pip
35+
uses: actions/cache@v1
36+
with:
37+
path: ${{ steps.pip-cache.outputs.dir }}
38+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-${{ matrix.python-version }}-
41+
${{ runner.os }}-pip-
42+
- name: Install the Python dependencies
43+
run: |
44+
pip install -e .[test]
45+
- name: List installed packages
46+
run: |
47+
pip freeze
48+
pip check
49+
- name: Run the tests
50+
if: ${{ matrix.os != 'windows' }}
51+
run: |
52+
pytest -vv
53+
- name: Run basic test on Windows
54+
if: ${{ matrix.os == 'windows' }}
55+
run: |
56+
pytest terminado/tests/basic_test.py::CommonTests::test_basic

.travis.yml

-20
This file was deleted.

README.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ JS:
2222
* ``terminado/_static/terminado.js``: A lightweight wrapper to set up a
2323
term.js terminal with a websocket.
2424

25+
Local Installation:
26+
27+
$ pip install -e .[test]
28+
29+
2530
Usage example:
2631

2732
.. code:: python
@@ -66,4 +71,4 @@ for more examples. This is a simplified version of the ``single.py`` demo.
6671

6772
Run the unit tests with:
6873

69-
$ nosetests
74+
$ pytest

appveyor.yml

-28
This file was deleted.

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"pywinpty (>=0.5);os_name=='nt'",
2525
"tornado (>=4)",
2626
],
27+
extras_require = dict(test=['pytest']),
2728
python_requires=">=3.6",
2829
classifiers=[
2930
"Environment :: Web Environment",

0 commit comments

Comments
 (0)