Skip to content

Commit 0f0803e

Browse files
committed
Add tests.
1 parent 775943d commit 0f0803e

34 files changed

+828
-41
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ tag = True
1212
[bumpversion:file:tox_envlist/__init__.py]
1313

1414
[bumpversion:file:tox_recreate_hook/__init__.py]
15+
16+
[bumpversion:file:doc-source/index.rst]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: "Docs Check"
4+
on:
5+
- pull_request
6+
- push
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout 🛎️
13+
uses: "actions/checkout@v1"
14+
- name: Install and Build 🔧
15+
uses: ammaraskar/sphinx-action@master
16+
with:
17+
pre-build-command: apt-get update && apt-get install gcc python3-dev git pandoc -y && python -m pip install tox
18+
docs-folder: "doc-source/"
19+
build-command: "tox -e docs -- -W "

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Python 🐍
2525
uses: "actions/setup-python@v2"
2626
with:
27-
python-version: "3.6"
27+
python-version: "3.7"
2828

2929
- name: Install dependencies 🔧
3030
run: |

.github/workflows/python_ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
runs-on: "windows-2019"
1414
continue-on-error: ${{ matrix.config.experimental }}
1515
env:
16-
USING_COVERAGE: '3.6,3.7,3.8,3.9'
16+
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-alpha.5'
1717

1818
strategy:
1919
fail-fast: False
2020
matrix:
2121
config:
22-
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
2322
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
2423
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
2524
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
25+
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}
2626

2727
steps:
2828
- name: Checkout 🛎️
@@ -42,3 +42,10 @@ jobs:
4242
4343
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
4444
run: python -m tox -e "${{ matrix.config.testenvs }}"
45+
46+
- name: "Upload Coverage 🚀"
47+
uses: actions/upload-artifact@v2
48+
if: ${{ always() }}
49+
with:
50+
name: "coverage-${{ matrix.config.python-version }}"
51+
path: .coverage

.github/workflows/python_ci_linux.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ jobs:
1313
runs-on: "ubuntu-20.04"
1414
continue-on-error: ${{ matrix.config.experimental }}
1515
env:
16-
USING_COVERAGE: '3.6,3.7,3.8,3.9'
16+
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-alpha.5,pypy-3.6'
1717

1818
strategy:
1919
fail-fast: False
2020
matrix:
2121
config:
22-
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
2322
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
2423
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
2524
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
25+
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}
26+
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
2627

2728
steps:
2829
- name: Checkout 🛎️
@@ -39,11 +40,61 @@ jobs:
3940
python -m site
4041
python -m pip install --upgrade pip setuptools wheel
4142
python -m pip install --upgrade tox virtualenv
43+
python -m pip install --upgrade coverage_pyver_pragma
4244
4345
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
4446
run: python -m tox -e "${{ matrix.config.testenvs }}"
4547

48+
- name: "Upload Coverage 🚀"
49+
uses: actions/upload-artifact@v2
50+
if: ${{ always() }}
51+
with:
52+
name: "coverage-${{ matrix.config.python-version }}"
53+
path: .coverage
54+
55+
56+
Coverage:
57+
needs: tests
58+
runs-on: "ubuntu-20.04"
59+
steps:
60+
- name: Checkout 🛎️
61+
uses: "actions/checkout@v2"
62+
63+
- name: Setup Python 🐍
64+
uses: "actions/setup-python@v2"
65+
with:
66+
python-version: 3.8
4667

68+
- name: Install dependencies 🔧
69+
run: |
70+
python -m pip install --upgrade pip setuptools wheel
71+
python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma
72+
73+
- name: "Download Coverage 🪂"
74+
uses: actions/download-artifact@v2
75+
with:
76+
path: coverage
77+
78+
- name: Display structure of downloaded files
79+
run: ls -R
80+
working-directory: coverage
81+
82+
- name: Combine Coverage 👷
83+
run: |
84+
shopt -s globstar
85+
python -m coverage combine coverage/**/.coverage
86+
87+
- name: "Upload Combined Coverage Artefact 🚀"
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: "combined-coverage"
91+
path: .coverage
92+
93+
- name: "Upload Combined Coverage to Coveralls"
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
run: |
97+
coveralls --service=github
4798
4899
Deploy:
49100
needs: tests

.github/workflows/python_ci_macos.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ jobs:
1313
runs-on: "macos-latest"
1414
continue-on-error: ${{ matrix.config.experimental }}
1515
env:
16-
USING_COVERAGE: '3.6,3.7,3.8,3.9'
16+
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-alpha.5,pypy-3.6'
1717

1818
strategy:
1919
fail-fast: False
2020
matrix:
2121
config:
22-
- {python-version: "3.6", testenvs: "py36,build", experimental: False}
2322
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
2423
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
2524
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
25+
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}
26+
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
2627

2728
steps:
2829
- name: Checkout 🛎️
@@ -42,3 +43,10 @@ jobs:
4243
4344
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
4445
run: python -m tox -e "${{ matrix.config.testenvs }}"
46+
47+
- name: "Upload Coverage 🚀"
48+
uses: actions/upload-artifact@v2
49+
if: ${{ always() }}
50+
with:
51+
name: "coverage-${{ matrix.config.python-version }}"
52+
path: .coverage

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
files: ^tox_recreate_hook/.*\.py$
4242

4343
- repo: https://github.com/domdfcoding/flake2lint
44-
rev: v0.2.0
44+
rev: v0.3.0
4545
hooks:
4646
- id: flake2lint
4747

@@ -68,7 +68,7 @@ repos:
6868
- id: forbid-crlf
6969

7070
- repo: https://github.com/repo-helper/formate
71-
rev: v0.4.0
71+
rev: v0.4.2
7272
hooks:
7373
- id: formate
7474
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.(_)?py$

.readthedocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
# Read the Docs configuration file
3+
---
4+
version: 2
5+
sphinx:
6+
builder: html
7+
configuration: doc-source/conf.py
8+
formats: all
9+
python:
10+
version: 3.8
11+
install:
12+
- requirements: requirements.txt
13+
- requirements: doc-source/requirements.txt
14+
- method: pip
15+
path: .

README.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,25 @@ tox-recreate-hook
1515
:stub-columns: 1
1616
:widths: 10 90
1717

18+
* - Docs
19+
- |docs| |docs_check|
1820
* - Tests
19-
- |actions_linux| |actions_windows| |actions_macos|
21+
- |actions_linux| |actions_windows| |actions_macos| |coveralls|
2022
* - Activity
2123
- |commits-latest| |commits-since| |maintained|
2224
* - QA
2325
- |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci|
2426
* - Other
2527
- |license| |language| |requires|
2628

29+
.. |docs| image:: https://img.shields.io/readthedocs/tox-recreate-hook/latest?logo=read-the-docs
30+
:target: https://tox-recreate-hook.readthedocs.io/en/latest
31+
:alt: Documentation Build Status
32+
33+
.. |docs_check| image:: https://github.com/domdfcoding/tox-recreate-hook/workflows/Docs%20Check/badge.svg
34+
:target: https://github.com/domdfcoding/tox-recreate-hook/actions?query=workflow%3A%22Docs+Check%22
35+
:alt: Docs Check Status
36+
2737
.. |actions_linux| image:: https://github.com/domdfcoding/tox-recreate-hook/workflows/Linux/badge.svg
2838
:target: https://github.com/domdfcoding/tox-recreate-hook/actions?query=workflow%3A%22Linux%22
2939
:alt: Linux Test Status
@@ -48,6 +58,10 @@ tox-recreate-hook
4858
:target: https://requires.io/github/domdfcoding/tox-recreate-hook/requirements/?branch=master
4959
:alt: Requirements Status
5060

61+
.. |coveralls| image:: https://img.shields.io/coveralls/github/domdfcoding/tox-recreate-hook/master?logo=coveralls
62+
:target: https://coveralls.io/github/domdfcoding/tox-recreate-hook?branch=master
63+
:alt: Coverage
64+
5165
.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/domdfcoding/tox-recreate-hook?logo=codefactor
5266
:target: https://www.codefactor.io/repository/github/domdfcoding/tox-recreate-hook
5367
:alt: CodeFactor Grade

doc-source/404.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:orphan:
2+
3+
===============
4+
404
5+
===============
6+
7+
We looked everywhere but we couldn't find that page!
8+
9+
.. image:: not-found.png
10+
:align: center
11+
12+
Try using the links in the sidebar to find what you are looking for.

0 commit comments

Comments
 (0)