Skip to content

Commit

Permalink
Fixes the CI system
Browse files Browse the repository at this point in the history
* space

* update black

* add conftest

* use black

* use profile

* use poetry without venv

* update test_timeout

* fix test map square

* update test_timeout

* fix test_del1

* update dependencies

* fix coverage

* fix test_timeout
  • Loading branch information
cgarciae authored Jan 1, 2021
1 parent 1245fc2 commit 03483e9
Show file tree
Hide file tree
Showing 45 changed files with 755 additions and 428 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ on:
- master
pull_request:
jobs:
wip:
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
name: Check for WIP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
black-test:
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
name: Black Python code format
runs-on: ubuntu-latest
steps:
Expand All @@ -24,6 +31,7 @@ jobs:
- name: Ensure contributor used ("black ./") before commit
run: black --check .
test:
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -39,17 +47,20 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: dschep/install-poetry-action@v1.2
uses: snok/install-poetry@v1.1.1
with:
version: 1.1.4

- name: Install Dependencies
run: |
poetry export --without-hashes --dev -f requirements.txt > requirements.txt
pip install -r requirements.txt
poetry config virtualenvs.create false
poetry install
- name: Run Tests
run: bash scripts/get-coverage.sh
run: |
coverage run --concurrency=multiprocessing -m pytest --hypothesis-profile=pypeln
coverage combine
coverage xml --omit '.venv/*' --omit '*_test.py'
- name: Upload coverage
uses: codecov/codecov-action@v1
4 changes: 3 additions & 1 deletion benchmarks/100_million_downloads/client-pypeln-idiomatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ async def fetch(url):
return await response.read()

await pl.task.each(
fetch, urls, workers=limit,
fetch,
urls,
workers=limit,
)


Expand Down
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from hypothesis import settings

settings.register_profile("pypeln", deadline=1000)
Loading

0 comments on commit 03483e9

Please sign in to comment.