From c968a32f81d5d859671c85d14bf2c29c36f34af0 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 19 Nov 2020 11:21:47 +0300 Subject: [PATCH] Moves to Github Actions --- .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 31 ------------------------ CHANGELOG.md | 12 ++++++++++ CONTRIBUTING.md | 1 - README.md | 4 ++-- pyproject.toml | 6 ++--- safe_assert/__init__.py | 2 -- 7 files changed, 66 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a02fa7c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: test + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - 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 - + + 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 safe_assert + poetry run pytest + poetry run doc8 -q docs + poetry check + poetry run pip check + poetry run safety check --full-report + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 10272e3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: python -dist: xenial - -python: - - 3.6 - - 3.7 - - 3.8 - -before_install: - - pip freeze | xargs pip uninstall -y - - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - - source "$HOME/.poetry/env" - -install: poetry install - -script: - - poetry run flake8 . - - poetry run mypy safe_assert - - poetry run pytest - - poetry check - - poetry run pip check - - poetry run safety check --bare --full-report - -after_success: - - pip install coveralls - - coveralls - -notifications: - email: - on_success: never - on_failure: change diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ea216..fcbafbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ We follow Semantic Versions since the `0.1.0` release. +## Version 0.3.0 + +### Features + +- Adds `python3.9` support + +### Misc + +- Moves to Github Actions +- Bumps all dev-dependencies + + ## Version 0.2.0 ### Features diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0184215..27c0487 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,7 +76,6 @@ Before submitting your code please do the following steps: 6. Run `pytest` again to make sure it is still working 7. Run `mypy` to ensure that types are correct 8. Run `flake8` to ensure that style is correct -9. Run `doc8` to ensure that docs are correct ## Other help diff --git a/README.md b/README.md index 0844dcf..a0aaf0f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # safe-assert [![wemake.services](https://img.shields.io/badge/%20-wemake.services-green.svg?label=%20&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC%2FxhBQAAAAFzUkdCAK7OHOkAAAAbUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP%2F%2F%2F5TvxDIAAAAIdFJOUwAjRA8xXANAL%2Bv0SAAAADNJREFUGNNjYCAIOJjRBdBFWMkVQeGzcHAwksJnAPPZGOGAASzPzAEHEGVsLExQwE7YswCb7AFZSF3bbAAAAABJRU5ErkJggg%3D%3D)](https://wemake.services) -[![Build Status](https://travis-ci.com/sobolevn/safe-assert.svg?branch=master)](https://travis-ci.com/sobolevn/safe-assert) -[![Coverage](https://coveralls.io/repos/github/sobolevn/safe-assert/badge.svg?branch=master)](https://coveralls.io/github/sobolevn/safe-assert?branch=master) +[![test](https://github.com/sobolevn/safe-assert/workflows/test/badge.svg?branch=master&event=push)](https://github.com/sobolevn/safe-assert/actions?query=workflow%3Atest) +[![codecov](https://codecov.io/gh/sobolevn/safe-assert/branch/master/graph/badge.svg)](https://codecov.io/gh/sobolevn/safe-assert) [![Python Version](https://img.shields.io/pypi/pyversions/safe-assert.svg)](https://pypi.org/project/safe-assert/) [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide) diff --git a/pyproject.toml b/pyproject.toml index 6da777f..79b04f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["poetry>=1.0"] -build-backend = "poetry.masonry.api" +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" [tool.nitpick] @@ -9,7 +9,7 @@ style = "https://raw.githubusercontent.com/wemake-services/wemake-python-stylegu [tool.poetry] name = "safe-assert" -version = "0.2.0" +version = "0.3.0" description = "Safe assert for Python that can be used together with optimised mode" license = "MIT" diff --git a/safe_assert/__init__.py b/safe_assert/__init__.py index 9547dbe..af2e726 100644 --- a/safe_assert/__init__.py +++ b/safe_assert/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from typing import NoReturn, Optional