Skip to content

Commit 4217144

Browse files
authored
Merge pull request #153 from papr/tests_prior_3_6
Move testing from Travis to Github Actions
2 parents 0e114b8 + 1fedfcb commit 4217144

File tree

3 files changed

+34
-32
lines changed

3 files changed

+34
-32
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,38 @@ jobs:
2626
name: distribution
2727
path: dist/
2828

29+
run_tests:
30+
name: "Run tests"
31+
needs: [build_sdist]
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
max-parallel: 1
35+
matrix:
36+
os: [ubuntu-latest, macOS-latest, windows-latest]
37+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
38+
steps:
39+
- uses: actions/checkout@v1
40+
- name: Set up Python ${{ matrix.python-version }}
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
- uses: actions/download-artifact@v2
45+
with:
46+
name: distribution
47+
path: dist/
48+
- name: Install dependencies
49+
shell: bash # enables file pattern matching on Windows
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install nose
53+
pip install dist/zeromq-pyre-*.tar.gz
54+
- name: Test with nose
55+
working-directory: tests
56+
run: python -m nose -v --exe
57+
2958
publish:
3059
runs-on: ubuntu-latest
31-
needs: [build_sdist]
60+
needs: [run_tests]
3261
steps:
3362
- uses: actions/checkout@v2
3463
- uses: actions/download-artifact@v2

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/test_zbeacon.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import unittest
2-
#import pyre
32
import zmq
4-
import time
53
import struct
64
import uuid
7-
import logging
85
import socket
96
from pyre.zactor import ZActor
107
from pyre.zbeacon import ZBeacon
118

12-
class ZBeaconTest(unittest.TestCase):
13-
9+
10+
class ZBeaconTest(unittest.TestCase):
1411
def setUp(self, *args, **kwargs):
1512
ctx = zmq.Context()
1613
ctx = zmq.Context()
@@ -55,8 +52,8 @@ def test_recv_beacon1(self):
5552
self.node2.send(self.transmit2)
5653
req = self.node1.recv_multipart()
5754
self.assertEqual(self.transmit2, req[1])
58-
59-
def test_recv_beacon1(self):
55+
56+
def test_recv_beacon2(self):
6057
self.node1.send_unicode("PUBLISH", zmq.SNDMORE)
6158
self.node1.send(self.transmit1)
6259
self.node2.send_unicode("PUBLISH", zmq.SNDMORE)
@@ -67,15 +64,6 @@ def test_recv_beacon1(self):
6764
# end ZBeaconTest
6865

6966
if __name__ == '__main__':
70-
71-
#print(logging.Logger.manager.loggerDict)
72-
logger = logging.getLogger()
73-
logger.setLevel(logging.DEBUG)
74-
ch = logging.StreamHandler()
75-
ch.setLevel(logging.DEBUG)
76-
logger.addHandler(ch)
77-
logging.getLogger("pyre.zbeacon2").setLevel(logging.DEBUG)
78-
7967
try:
8068
unittest.main()
8169
except Exception as a:

0 commit comments

Comments
 (0)