Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 536b0eb

Browse files
committed
Initial commit
0 parents  commit 536b0eb

File tree

17 files changed

+4570
-0
lines changed

17 files changed

+4570
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: CI
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
push:
7+
branches: [ main, unsquashed-private ]
8+
pull_request:
9+
branches: [ main, unsquashed-private ]
10+
11+
# Run the pipeline daily so that we get continuous dogfooding and coverage of the latest Python
12+
# and PyTest patch versions.
13+
schedule:
14+
# Run at 6pm UTC/10am Pacific
15+
- cron: 0 18 * * *
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch: { }
19+
20+
defaults:
21+
run:
22+
shell: bash -eo pipefail {0}
23+
24+
jobs:
25+
check:
26+
name: Typecheck, lint, and check code style
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "3.10"
35+
36+
- name: Install tox
37+
id: install
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install tox
41+
42+
- name: Typecheck
43+
run: tox -e mypy
44+
45+
- name: Lint
46+
if: ${{ always() && steps.install.outcome == 'success' }}
47+
run: tox -e flake8
48+
49+
- name: Check code style
50+
if: ${{ always() && steps.install.outcome == 'success' }}
51+
run: tox -e pycodestyle
52+
53+
- name: Build PyPI package
54+
if: ${{ always() && steps.install.outcome == 'success' }}
55+
run: |
56+
pip install build twine
57+
python -m build
58+
59+
pytest_integration_tests:
60+
name: "PyTest Integration Tests: ${{ matrix.tox_env }}-${{ matrix.os }}"
61+
runs-on: ${{ matrix.os }}
62+
needs:
63+
# Don't incur the cost of the test matrix if the basic build fails.
64+
- check
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
os: [ubuntu-latest, windows-latest]
69+
tox_env:
70+
- py37-pytest62
71+
- py37-pytest70
72+
- py37-pytest71
73+
- py38-pytest62
74+
- py38-pytest70
75+
- py38-pytest71
76+
- py39-pytest62
77+
- py39-pytest70
78+
- py39-pytest71
79+
- py310-pytest62
80+
- py310-pytest70
81+
- py310-pytest71
82+
include:
83+
- tox_env: "py37-pytest62"
84+
python: "3.7"
85+
- tox_env: "py37-pytest70"
86+
python: "3.7"
87+
- tox_env: "py37-pytest71"
88+
python: "3.7"
89+
- tox_env: "py38-pytest62"
90+
python: "3.8"
91+
- tox_env: "py38-pytest70"
92+
python: "3.8"
93+
- tox_env: "py38-pytest71"
94+
python: "3.8"
95+
- tox_env: "py39-pytest62"
96+
python: "3.9"
97+
- tox_env: "py39-pytest70"
98+
python: "3.9"
99+
- tox_env: "py39-pytest71"
100+
python: "3.9"
101+
- tox_env: "py310-pytest62"
102+
python: "3.10"
103+
- tox_env: "py310-pytest70"
104+
python: "3.10"
105+
- tox_env: "py310-pytest71"
106+
python: "3.10"
107+
108+
steps:
109+
- uses: actions/checkout@v2
110+
111+
- name: Set up Python
112+
uses: actions/setup-python@v2
113+
with:
114+
python-version: ${{ matrix.python }}
115+
116+
- name: Install tox
117+
run: |
118+
python -m pip install --upgrade pip
119+
pip install tox
120+
121+
- name: Enable Unflakable dogfooding
122+
run: |
123+
echo "UNFLAKABLE_API_KEY=${{ secrets.UNFLAKABLE_API_KEY }}" >> $GITHUB_ENV
124+
if: github.event.action != 'pull_request'
125+
126+
- name: Test
127+
run: |
128+
TOX_TESTENV_PASSENV=UNFLAKABLE_API_KEY tox -e ${{ matrix.tox_env }} -- \
129+
--enable-unflakable \
130+
--test-suite-id 2AT4xgduQdwkVKSaO0qJ2Dqm2JY \
131+
-s \
132+
-v
133+
134+
publish:
135+
name: Publish to PyPI
136+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
137+
runs-on: ubuntu-latest
138+
needs:
139+
- check
140+
- pytest_integration_tests
141+
142+
steps:
143+
- uses: actions/checkout@v2
144+
145+
- name: Set up Python
146+
uses: actions/setup-python@v2
147+
with:
148+
python-version: "3.10"
149+
150+
- name: Install build dependencies
151+
run: |
152+
python -m pip install --upgrade pip
153+
pip install build twine
154+
155+
- name: Build package
156+
run: |
157+
python -m build
158+
159+
- name: Publish package to PyPI
160+
uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295
161+
with:
162+
user: __token__
163+
password: ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# IntelliJ
2+
.idea
3+
*.iml
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
pip-wheel-metadata/
28+
share/python-wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
MANIFEST
33+
34+
# PyInstaller
35+
# Usually these files are written by a python script from a template
36+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
37+
*.manifest
38+
*.spec
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
47+
.nox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
*.py,cover
55+
.hypothesis/
56+
.pytest_cache/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
.python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
99+
__pypackages__/
100+
101+
# Celery stuff
102+
celerybeat-schedule
103+
celerybeat.pid
104+
105+
# SageMath parsed files
106+
*.sage.py
107+
108+
# Environments
109+
.env
110+
.venv
111+
env/
112+
venv/
113+
ENV/
114+
env.bak/
115+
venv.bak/
116+
117+
# Spyder project settings
118+
.spyderproject
119+
.spyproject
120+
121+
# Rope project settings
122+
.ropeproject
123+
124+
# mkdocs documentation
125+
/site
126+
127+
# mypy
128+
.mypy_cache/
129+
.dmypy.json
130+
dmypy.json
131+
132+
# Pyre type checker
133+
.pyre/
134+
135+
# misc files
136+
*~
137+
.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 unflakable
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<p align="center">
2+
<a href="https://unflakable.com" target="_blank" rel="noopener" align="center">
3+
<img src="https://github.com/unflakable/unflakable-python/blob/main/images/logo.svg?raw=true" width="350" alt="Unflakable" />
4+
</a>
5+
</p>
6+
7+
[![Twitter](https://img.shields.io/twitter/url?label=%40unflakable&style=social&url=https%3A%2F%2Ftwitter.com%2Funflakable)](https://twitter.com/unflakable)
8+
9+
# Official Unflakable Plugins for Python
10+
11+
This repository contains the official [Unflakable](https://unflakable.com) plugins for Python.
12+
13+
## Getting Started
14+
15+
Refer to our [Getting Started](https://docs.unflakable.com/getting-started) documentation
16+
for instructions on getting started using Unflakable.
17+
18+
## PyTest Plugin
19+
20+
This Unflakable plugin enables users of the [PyTest](https://pytest.org) Python test framework
21+
to quarantine flaky tests and track test results.
22+
23+
Refer to the [PyTest Plugin](https://docs.unflakable.com/plugins/pytest) documentation for
24+
complete usage instructions. Users of the Python
25+
[`unittest` unit testing framework](https://docs.python.org/3/library/unittest.html) may use this
26+
plugin by leveraging PyTest's [out-of-the-box support](https://docs.pytest.org/how-to/unittest.html)
27+
for running `unittest` tests.
28+
29+
### Compatibility
30+
31+
This plugin maintains compatibility with the PyTest and Python versions listed below:
32+
33+
![Python versions](https://img.shields.io/pypi/pyversions/pytest-unflakable)
34+
![PyTest versions](https://img.shields.io/badge/pytest-6.2%20%7C%207.0%20%7C%207.1-blue)
35+
36+
## Contributing
37+
38+
To report a bug or request a new feature, please
39+
[file a GitHub issue](https://github.com/unflakable/unflakable-python/issues).
40+
We also welcome pull requests!

images/logo.svg

Lines changed: 22 additions & 0 deletions
Loading

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42"]
3+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)