Skip to content

Commit

Permalink
Implement CI with tox + GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Apr 22, 2021
1 parent 93a2141 commit 4e45087
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test
on:
# Run CI on all pushes to the master and release/** branches, and on all new
# pull requests, and on all pushes to pull requests (even if a pull request
# is not against master).
push:
branches:
- "master"
- "releases/**"
pull_request:
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-18.04
name: "test"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Tox
run: sudo apt-get install tox
- name: Run Tests
run: tox
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ pytest-responses
.. image:: https://img.shields.io/pypi/v/pytest-responses.svg
:target: https://pypi.python.org/pypi/pytest-responses/

.. image:: https://github.com/getsentry/pytest-responses/workflows/test/badge.svg
:target: https://github.com/getsentry/pytest-responses/actions/test

Automatically activate responses across your py.test-powered test suite (thus preventing HTTP requests).

.. sourcecode:: shell
Expand Down
4 changes: 2 additions & 2 deletions pytest_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def pytest_runtest_teardown(item):
responses_.stop()
responses_.reset()
except (AttributeError, RuntimeError):
# patcher was already uninstalled (or not installed at all) and responses doesnt let us
# force maintain it
# patcher was already uninstalled (or not installed at all) and
# responses doesnt let us force maintain it
pass


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool:pytest]
addopts=
--strict
--strict-markers
--tb=short
-p no:doctest
norecursedirs = bin dist docs htmlcov .* {args}
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
# 2.5.0 is what we can get easily on Ubuntu 18.04
minversion = 2.5.0
envlist = py27,py39

[testenv]
setenv =
PYFLAKES_NODOCTEST=1
deps =
flake8
commands =
flake8 .
pytest .

0 comments on commit 4e45087

Please sign in to comment.