Add github test workflow

This commit is contained in:
Elvis Pranskevichus 2019-10-25 09:47:15 -04:00 committed by Yury Selivanov
parent 6ef69a797d
commit 3be8967eb4
4 changed files with 62 additions and 4 deletions

View File

@ -0,0 +1,7 @@
Cython==0.29.10
aiohttp
tinys3
twine
psutil
pyOpenSSL==18.0.0
flake8>=3.7.5

48
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: Tests
on:
push:
branches:
- master
- ci
pull_request:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
os: [ubuntu-16.04, macos-10.14]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 50
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install macOS deps
if: matrix.os == 'macos-10.14'
run: |
brew install gnu-sed
brew install --force libtool
brew install --force autoconf
brew install --force automake
- name: Install Python Deps
run: |
pip install --upgrade setuptools pip wheel
pip install -U -r .github/workflows/test-requirements.txt
- name: Test
run: |
make distclean && make && make test
make distclean && make debug && make test

View File

@ -159,7 +159,7 @@ class _TestBase:
self.assertEqual(calls, [10, 1])
self.assertFalse(self.loop.is_running())
self.assertLess(finished - started, 0.1)
self.assertLess(finished - started, 0.2)
self.assertGreater(finished - started, 0.04)
def test_call_later_2(self):
@ -219,9 +219,10 @@ class _TestBase:
self.assertGreaterEqual(finished - started, 69)
def test_call_at(self):
if os.environ.get('TRAVIS_OS_NAME'):
if (os.environ.get('TRAVIS_OS_NAME')
or os.environ.get('GITHUB_WORKFLOW')):
# Time seems to be really unpredictable on Travis.
raise unittest.SkipTest('time is not monotonic on Travis')
raise unittest.SkipTest('time is not monotonic on CI')
i = 0

View File

@ -840,7 +840,9 @@ class Test_UV_Process_Delayed(tb.UVTestCase):
})
def test_process_delayed_stdio__not_paused__no_stdin(self):
if os.environ.get('TRAVIS_OS_NAME') and sys.platform == 'darwin':
if ((os.environ.get('TRAVIS_OS_NAME')
or os.environ.get('GITHUB_WORKFLOW'))
and sys.platform == 'darwin'):
# Randomly crashes on Travis, can't reproduce locally.
raise unittest.SkipTest()