Merge branch 'master' into next-gen

This commit is contained in:
Jim Brännlund 2022-05-07 22:31:01 +02:00
commit aa85f41296
8 changed files with 50 additions and 47 deletions

View File

@ -20,16 +20,16 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.6
python-version: 3.9
- name: Install tox
run: python -m pip install --upgrade tox
- name: Build docs with tox
run: python -m tox -e docs
tests:
uses: pytest-dev/pytest-html/.github/workflows/tests.yml@master
uses: ./.github/workflows/tests.yml
publish:
name: Publish to PyPI registry
@ -41,14 +41,13 @@ jobs:
TOXENV: packaging
steps:
- name: Switch to using Python 3.6 by default
uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: 3.6
python-version: 3.9
- name: Install tox
run: python -m pip install --user tox
- name: Check out src from Git
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Get shallow Git history (default) for tag creation events
# but have a complete clone for any other workflows.

View File

@ -6,4 +6,5 @@ on:
jobs:
tests:
uses: pytest-dev/pytest-html/.github/workflows/tests.yml@master
if: github.repository_owner == 'pytest-dev'
uses: ./.github/workflows/tests.yml

View File

@ -8,20 +8,9 @@ jobs:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: py36-ubuntu
python-version: 3.6
- os: windows-latest
name: py36-windows
python-version: 3.6
- os: macOS-latest
name: py36-mac
python-version: 3.6
- os: ubuntu-latest
name: py37-ubuntu
python-version: 3.7
@ -58,18 +47,30 @@ jobs:
name: py39-mac
python-version: 3.9
- os: ubuntu-latest
name: py310-ubuntu
python-version: '3.10'
- os: windows-latest
name: py310-windows
python-version: '3.10'
- os: macOS-latest
name: py310-mac
python-version: '3.10'
- os: ubuntu-latest
name: pypy3-ubuntu
python-version: pypy3
python-version: pypy-3.8
- os: windows-latest
name: pypy3-windows
python-version: pypy3
python-version: pypy-3.8
# https://github.com/pytest-dev/pytest-html/issues/482
# - os: macOS-latest
# name: pypy3-mac
# python-version: pypy3
- os: macOS-latest
name: pypy3-mac
python-version: pypy-3.8
- os: ubuntu-latest
name: devel-ubuntu
@ -78,9 +79,11 @@ jobs:
steps:
- name: Set Newline Behavior
run : git config --global core.autocrlf false
- uses: actions/checkout@master
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix['python-version'] }}
- name: Install tox
@ -113,9 +116,9 @@ jobs:
name: grunt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install Dependencies

View File

@ -1,16 +1,16 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1 # also bump this in Pipfile
rev: 22.3.0
hooks:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1] # also bump this in Pipfile
additional_dependencies: [black==22.3.0]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@ -19,21 +19,21 @@ repos:
- id: check-yaml
- id: debug-statements
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4 # also bump this in Pipfile
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
language_version: python3
additional_dependencies:
- flake8-builtins==1.5.3
- flake8-typing-imports==1.9.0
- flake8-typing-imports==1.12.0
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.0
rev: v3.0.1
hooks:
- id: reorder-python-imports
args: ["--application-directories=.:src:testing", --py3-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.4.4
rev: v2.32.0
hooks:
- id: pyupgrade
args: [--py3-plus]

View File

@ -6,8 +6,8 @@ verify_ssl = true
[dev-packages]
pytest = "*"
tox = "*"
flake8 = "==3.8.4" # also bump this in .pre-commit-config.yaml
black = "==20.8b1" # also bump this in .pre-commit-config.yaml
flake8 = "==4.0.1" # also bump this in .pre-commit-config.yaml
black = "==22.3.0" # also bump this in .pre-commit-config.yaml
pre-commit = "*"
pytest-rerunfailures = "*"

View File

@ -4,20 +4,20 @@
def pytest_html_report_title(report):
""" Called before adding the title to the report """
"""Called before adding the title to the report"""
def pytest_html_results_summary(prefix, summary, postfix):
""" Called before adding the summary section to the report """
"""Called before adding the summary section to the report"""
def pytest_html_results_table_header(cells):
""" Called after building results table header. """
"""Called after building results table header."""
def pytest_html_results_table_row(report, cells):
""" Called after building results table row. """
"""Called after building results table row."""
def pytest_html_results_table_html(report, data):
""" Called after building results table additional HTML. """
"""Called after building results table additional HTML."""

View File

@ -823,7 +823,7 @@ class TestHTML:
"content,expected_content", _test_environment_list_value_data_set
)
def test_environment_list_value(self, testdir, content, expected_content):
expected_html_re = fr"<td>content</td>\n\s+<td>{expected_content}</td>"
expected_html_re = rf"<td>content</td>\n\s+<td>{expected_content}</td>"
testdir.makeconftest(
f"""
def pytest_configure(config):

View File

@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = py{36,37,38,39,py3}, docs, linting
envlist = py{37,38,39,310,py3}, docs, linting
isolated_build = True
[testenv]