diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d3115a6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release Package + +on: [workflow_dispatch] + +permissions: + contents: read + +jobs: + build_package: + name: Build Package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build sdist and wheel + run: pipx run build --sdist --wheel + - uses: actions/upload-artifact@v3 + with: + path: dist + + pypi-publish: + needs: [build_package] + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/setup.py b/setup.py index 05a8075..8190a33 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(fname): setup( name="pytest-icdiff", - version="0.6", + version="0.7", author="Harry Percival", author_email="obeythetestinggoat@gmail.com", maintainer="Harry Percival", diff --git a/tests/test_pytest_icdiff.py b/tests/test_pytest_icdiff.py index 8444d23..9dfba75 100644 --- a/tests/test_pytest_icdiff.py +++ b/tests/test_pytest_icdiff.py @@ -1,4 +1,6 @@ import icdiff +from unittest import mock +import pytest import re from pprintpp import pformat @@ -8,6 +10,7 @@ ANSI_ESCAPE_RE = re.compile(r'(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]') + def test_short_dict(testdir): one = { 1: "the number one", @@ -286,7 +289,7 @@ def test_one(): assert one == two """ ) - output = testdir.runpytest('-vv', '--color=yes').stdout.str() + output = testdir.runpytest('-vv', '--color=yes', '-r=no').stdout.str() assert len(output.splitlines()) < 50 assert "---" in output # context split marker