10000 Merge remote-tracking branch 'origin/master' into altendky-support_an… · python-trio/pytest-trio@1b6dff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b6dff9

Browse files
committed
Merge remote-tracking branch 'origin/master' into altendky-support_and_use_pep517
2 parents 1a45cc4 + c4e1fe3 commit 1b6dff9

23 files changed

+1224
-148
lines changed

.appveyor.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "dependabot/**"
7+
pull_request:
8+
9+
jobs:
10+
Windows:
11+
name: 'Windows (${{ matrix.python }})'
12+
runs-on: 'windows-latest'
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python: ['3.6', '3.7', '3.8', '3.9']
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Setup python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '${{ matrix.python }}'
24+
- name: Run tests
25+
run: ./ci.sh
26+
shell: bash
27+
env:
28+
# Should match 'name:' up above
29+
JOB_NAME: 'Windows (${{ matrix.python }})'
30+
31+
Ubuntu:
32+
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
33+
timeout-minutes: 10
34+
runs-on: 'ubuntu-latest'
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
python: ['pypy-3.6', '3.6', '3.7', '3.8', '3.9', '3.6-dev', '3.7-dev', '3.8-dev', '3.9-dev']
39+
check_formatting: ['0']
40+
check_docs: ['0']
41+
extra_name: ['']
42+
include:
43+
- python: '3.9'
44+
check_formatting: '1'
45+
extra_name: ', check formatting'
46+
- python: '3.9'
47+
check_docs: '1'
48+
extra_name: ', check docs'
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
- name: Setup python
53+
uses: actions/setup-python@v2
54+
if: "!endsWith(matrix.python, '-dev')"
55+
with:
56+
python-version: '${{ matrix.python }}'
57+
- name: Setup python (dev)
58+
uses: deadsnakes/action@v2.0.2
59+
if: endsWith(matrix.python, '-dev')
60+
with:
61+
python-version: '${{ matrix.python }}'
62+
- name: Run tests
63+
run: ./ci.sh
64+
env:
65+
CHECK_FORMATTING: '${{ matrix.check_formatting }}'
66+
CHECK_DOCS: '${{ matrix.check_docs }}'
67+
# Should match 'name:' up above
68+
JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
69+
70+
macOS:
71+
name: 'macOS (${{ matrix.python }})'
72+
timeout-minutes: 10
73+
runs-on: 'macos-latest'
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
python: ['3.6', '3.7', '3.8', '3.9']
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v2
81+
- name: Setup python
82+
uses: actions/setup-python@v2
83+
with:
84+
python-version: '${{ matrix.python }}'
85+
- name: Run tests
86+
run: ./ci.sh
87+
env:
88+
# Should match 'name:' up above
89+
JOB_NAME: 'macOS (${{ matrix.python }})'

.readthedocs.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# https://docs.readthedocs.io/en/latest/yaml-config.html
1+
# https://docs.readthedocs.io/en/latest/config-file/index.html
2+
version: 2
3+
24
formats:
35
- htmlzip
46
- epub
57

6-
requirements_file: ci/rtd-requirements.txt
7-
88
python:
9-
version: 3
10-
pip_install: True
9+
version: 3.7
10+
install:
11+
- requirements: docs-requirements.txt
12+
13+
sphinx:
14+
fail_on_warning: true

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

ci.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/bin/bash
2+
3+
set -ex -o pipefail
4+
5+
# Log some general info about the environment
6+
uname -a
7+
env | sort
8+
9+
# See https://github.com/python-trio/trio/issues/334
10+
YAPF_VERSION=0.22.0
11+
12+
# Curl's built-in retry system is not very robust; it gives up on lots of
13+
# network errors that we want to retry on. Wget might work better, but it's
14+
# not installed on azure pipelines's windows boxes. So... let's try some good
15+
# old-fashioned brute force. (This is also a convenient place to put options
16+
# we always want, like -f to tell curl to give an error if the server sends an
17+
# error response, and -L to follow redirects.)
18+
function curl-harder() {
19+
for BACKOFF in 0 1 2 4 8 15 15 15 15; do
20+
sleep $BACKOFF
21+
if curl -fL --connect-timeout 5 "$@"; then
22+
return 0
23+
fi
24+
done
25+
return 1
26+
}
27+
28+
29+
python -m pip install -U pip setuptools wheel pep517
30+
python -m pip --version
31+
32+
python -m pep517.build --source --out-dir dist/ .
33+
python -m pip install dist/*.tar.gz
34+
35+
if [ "$CHECK_FORMATTING" = "1" ]; then
36+
pip install yapf==${YAPF_VERSION}
37+
if ! yapf -rpd setup.py pytest_trio; then
38+
cat <<EOF
39+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41+
42+
Formatting problems were found (listed above). To fix them, run
43+
44+
pip install yapf==${YAPF_VERSION}
45+
yapf -rpi setup.py pytest_trio
46+
47+
in your local checkout.
48+
49+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
51+
EOF
52+
exit 1
53+
fi
54+
elif [ "$CHECK_DOCS" = "1" ]; then
55+
pip install -Ur docs-requirements.txt
56+
cd docs
57+
# -n (nit-picky): warn on missing references
58+
# -W: turn warnings into errors
59+
sphinx-build -nW -b html source build
60+
else
61+
# Actual tests
62+
python -m pip install -r test-requirements.txt
63+
64+
# We run the tests from inside an empty directory, to make sure Python
65+
# doesn't pick up any .py files from our working dir. Might have been
66+
# pre-created by some of the code above.
67+
mkdir empty || true
68+
cd empty
69+
70+
# These environment variables ensure that the import of the pytest-trio plugin is covered
71+
# even if pytest-trio is loaded before pytest-cov. See https://pytest-cov.readthedocs.io/en/latest/plugins.html
72+
env COV_CORE_SOURCE=pytest_trio COV_CORE_CONFIG=.coveragerc COV_CORE_DATAFILE=.coverage pytest
73+
74+
# The codecov docs recommend something like 'bash <(curl ...)' to pipe the
75+
# script directly into bash as its being downloaded. But, the codecov
76+
# server is flaky, so we instead save to a temp file with retries, and
77+
# wait until we've successfully fetched the whole script before trying to
78+
# run it.
79+
curl-harder -o codecov.sh https://codecov.io/bash
80+
bash codecov.sh -n "${JOB_NAME}"
81+
fi

ci/travis.sh

Lines changed: 0 additions & 63 deletions
This file was deleted.

ci/rtd-requirements.txt renamed to docs-requirements.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ sphinxcontrib-trio
55
# Workaround for this weird issue:
66
# https://travis-ci.org/python-trio/pytest-trio/jobs/407495415
77
attrs >= 17.4.0
8+
# != 19.9.0rc1 for https://github.com/twisted/towncrier/issues/180
9+
towncrier != 19.9.0rc1
10+
11+
# pytest-trio's own dependencies
12+
trio >= 0.15.0
13+
async_generator >= 1.9
14+
outcome
15+
# For node.get_closest_marker
16+
pytest >= 3.6

docs-requirements.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile --output-file=docs-requirements.txt docs-requirements.in
6+
#
7+
alabaster==0.7.12 # via sphinx
8+
async-generator==1.10 # via -r docs-requirements.in, trio
9+
attrs==20.2.0 # via -r docs-requirements.in, outcome, pytest, trio
10+
babel==2.8.0 # via sphinx
11+
certifi==2020.6.20 # via requests
12+
chardet==3.0.4 # via requests
13+
click==7.1.2 # via towncrier
14+
docutils==0.16 # via sphinx
15+
idna==2.10 # via requests, trio
16+
imagesize==1.2.0 # via sphinx
17+
incremental==17.5.0 # via towncrier
18+
iniconfig==1.0.1 # via pytest
19+
jinja2==2.11.2 # via sphinx, towncrier
20+
markupsafe==1.1.1 # via jinja2
21+
outcome==1.0.1 # via -r docs-requirements.in, trio
22+
packaging==20.4 # via pytest, sphinx
23+
pluggy==0.13.1 # via pytest
24+
py==1.9.0 # via pytest
25+
pygments==2.7.1 # via sphinx
26+
pyparsing==2.4.7 # via packaging
27+
pytest==6.1.1 # via -r docs-requirements.in
28+
pytz==2020.1 # via babel
29+
requests==2.24.0 # via sphinx
30+
six==1.15.0 # via packaging
31+
sniffio==1.2.0 # via trio
32+
snowballstemmer==2.0.0 # via sphinx
33+
sortedcontainers==2.2.2 # via trio
34+
sphinx-rtd-theme==0.5.0 # via -r docs-requirements.in
35+
sphinx==3.2.1 # via -r docs-requirements.in, sphinx-rtd-theme, sphinxcontrib-trio
36+
sphinxcontrib-applehelp==1.0.2 # via sphinx
37+
sphinxcontrib-devhelp==1.0.2 # via sphinx
38+
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
39+
sphinxcontrib-jsmath==1.0.1 # via sphinx
40+
sphinxcontrib-qthelp==1.0.3 # via sphinx
41+
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
42+
sphinxcontrib-trio==1.1.2 # via -r docs-requirements.in
43+
toml==0.10.1 # via pytest, towncrier
44+
towncrier==19.2.0 # via -r docs-requirements.in
45+
trio==0.17.0 # via -r docs-requirements.in
46+
urllib3==1.25.10 # via requests
47+
48+
# The following packages are considered to be unsafe in a requirements file:
49+
# setuptools

docs/source/_static/favicon-32.png

1.79 KB
Loading

0 commit comments

Comments
 (0)
0