Skip to content
Merged
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: test

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
curl -sSL \
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python
# Adding `poetry` to `$PATH`:
echo "$HOME/.poetry/bin" >> $GITHUB_PATH

- name: Set up cache
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install

- name: Run tests
run: |
poetry run flake8 .
poetry run mypy lambdas tests/**/*.py
poetry run pytest lambdas tests
poetry run doc8 -q docs
poetry run poetry check
poetry run pip check
poetry run safety check --full-report
# We do this to speed up the build:
poetry run pytest typesafety -p no:cov -o addopts="" --mypy-ini-file=setup.cfg

- name: Upload coverage to Codecov
if: matrix.python-version == 3.8
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

-----

[![Build Status](https://travis-ci.org/dry-python/lambdas.svg?branch=master)](https://travis-ci.org/dry-python/lambdas)
[![Coverage Status](https://coveralls.io/repos/github/dry-python/lambdas/badge.svg?branch=master)](https://coveralls.io/github/dry-python/lambdas?branch=master)
[![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)
[![codecov](https://codecov.io/gh/dry-python/lambdas/branch/master/graph/badge.svg)](https://codecov.io/gh/dry-python/lambdas)
[![Documentation Status](https://readthedocs.org/projects/lambdas/badge/?version=latest)](https://lambdas.readthedocs.io/en/latest/?badge=latest)
[![Python Version](https://img.shields.io/pypi/pyversions/lambdas.svg)](https://pypi.org/project/lambdas/)
[![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/)
Expand Down
3 changes: 2 additions & 1 deletion lambdas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
_Number = Union[int, float, complex]


def _fmap(callback):
def _fmap(callback): # pragma: nocover
# TODO: Remove `pragma` after https://github.com/dry-python/lambdas/issues/4
"""Convers callback to instance method with two arguments."""
def decorator(self, second):
return lambda first: callback(first, second)
Expand Down
Loading