diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 6b4a4e3..38a5300 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -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. diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d97d315..252aa36 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14404ca..0af6065 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcbc8a5..aa5c671 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/Pipfile b/Pipfile index 800e84c..58ceb8c 100644 --- a/Pipfile +++ b/Pipfile @@ -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 = "*" diff --git a/src/pytest_html/hooks.py b/src/pytest_html/hooks.py index 7b75120..f81f9e2 100644 --- a/src/pytest_html/hooks.py +++ b/src/pytest_html/hooks.py @@ -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.""" diff --git a/testing/test_pytest_html.py b/testing/test_pytest_html.py index aaa7bd2..c2f7b6b 100644 --- a/testing/test_pytest_html.py +++ b/testing/test_pytest_html.py @@ -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"