File tree Expand file tree Collapse file tree 7 files changed +505
-435
lines changed Expand file tree Collapse file tree 7 files changed +505
-435
lines changed Original file line number Diff line number Diff line change
1
+ name : test
2
+
3
+ on : [push, pull_request, workflow_dispatch]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ python-version : [3.6, 3.7, 3.8]
11
+
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v2
15
+
16
+ - name : Set up Python ${{ matrix.python-version }}
17
+ uses : actions/setup-python@v2
18
+ with :
19
+ python-version : ${{ matrix.python-version }}
20
+
21
+ - name : Install poetry
22
+ run : |
23
+ curl -sSL \
24
+ "https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python
25
+ # Adding `poetry` to `$PATH`:
26
+ echo "$HOME/.poetry/bin" >> $GITHUB_PATH
27
+
28
+ - name : Set up cache
29
+ uses : actions/cache@v2
30
+ with :
31
+ path : .venv
32
+ key : venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
33
+
34
+ - name : Install dependencies
35
+ run : |
36
+ poetry config virtualenvs.in-project true
37
+ poetry install
38
+
39
+ - name : Run tests
40
+ run : |
41
+ poetry run flake8 .
42
+ poetry run mypy lambdas tests/**/*.py
43
+ poetry run pytest lambdas tests
44
+ poetry run doc8 -q docs
45
+ poetry run poetry check
46
+ poetry run pip check
47
+ poetry run safety check --full-report
48
+ # We do this to speed up the build:
49
+ poetry run pytest typesafety -p no:cov -o addopts="" --mypy-ini-file=setup.cfg
50
+
51
+ - name : Upload coverage to Codecov
52
+ if : matrix.python-version == 3.8
53
+ uses : codecov/codecov-action@v1
54
+ with :
55
+ file : ./coverage.xml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
-----
4
4
5
- [ ![ Build Status] ( https://travis-ci.org /dry-python/lambdas.svg?branch=master )] ( https://travis-ci.org /dry-python/lambdas )
6
- [ ![ Coverage Status ] ( https://coveralls .io/repos/github/ dry-python/lambdas/badge.svg?branch=master )] ( https://coveralls .io/github /dry-python/lambdas?branch=master )
5
+ [ ![ Build Status] ( https://github.com /dry-python/lambdas/workflows/test/badge .svg?branch=master&event=push )] ( https://github.com /dry-python/lambdas/actions?query=workflow%3Atest )
6
+ [ ![ codecov ] ( https://codecov .io/gh/ dry-python/lambdas/branch/master/graph/ badge.svg )] ( https://codecov .io/gh /dry-python/lambdas )
7
7
[ ![ Documentation Status] ( https://readthedocs.org/projects/lambdas/badge/?version=latest )] ( https://lambdas.readthedocs.io/en/latest/?badge=latest )
8
8
[ ![ Python Version] ( https://img.shields.io/pypi/pyversions/lambdas.svg )] ( https://pypi.org/project/lambdas/ )
9
9
[ ![ wemake-python-styleguide] ( https://img.shields.io/badge/style-wemake-000000.svg )] ( https://github.com/wemake-services/wemake-python-styleguide ) [ ![ Checked with mypy] ( http://www.mypy-lang.org/static/mypy_badge.svg )] ( http://mypy-lang.org/ )
Original file line number Diff line number Diff line change 12
12
_Number = Union [int , float , complex ]
13
13
14
14
15
- def _fmap (callback ):
15
+ def _fmap (callback ): # pragma: nocover
16
+ # TODO: Remove `pragma` after https://github.com/dry-python/lambdas/issues/4
16
17
"""Convers callback to instance method with two arguments."""
17
18
def decorator (self , second ):
18
19
return lambda first : callback (first , second )
You can’t perform that action at this time.
0 commit comments