diff --git a/.github/actions/freebsd-vm/action.yml b/.github/actions/freebsd-vm/action.yml index dac0a89f..a664e1b7 100644 --- a/.github/actions/freebsd-vm/action.yml +++ b/.github/actions/freebsd-vm/action.yml @@ -43,6 +43,6 @@ runs: pdm config install.cache true run: | set -e - pdm install --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox + pdm install --verbose --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox tox --version ${{ inputs.run }} diff --git a/.github/actions/setup-tox/action.yml b/.github/actions/setup-tox/action.yml index 9482dfa0..a58d8929 100644 --- a/.github/actions/setup-tox/action.yml +++ b/.github/actions/setup-tox/action.yml @@ -47,7 +47,7 @@ runs: shell: bash - name: Install dependencies run: | - pdm install --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox + pdm install --verbose --frozen-lockfile --global --project=. --no-self --no-default --dev --group=tox tox --version ls -lA env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4153b59..9587858b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ on: - '!README.md' - '.github/**' - '!.github/actions/setup-tox/**' + - '!.github/actions/pdm.conf' - '!.github/workflows/build.yml' - '.vscode/**' - 'benchmark/**' @@ -38,6 +39,7 @@ on: - '!README.md' - '.github/**' - '!.github/actions/setup-tox/**' + - '!.github/actions/pdm.conf' - '!.github/workflows/build.yml' - '.vscode/**' - 'benchmark/**' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 012d67ac..f8e5f216 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,6 +20,8 @@ on: - 'pyproject.toml' - 'pdm.lock' - '.github/actions/setup-tox/**' + - '.github/actions/freebsd-vm/**' + - '.github/actions/pdm.conf' - '.github/workflows/lint.yml' push: branches: @@ -36,6 +38,8 @@ on: - 'pyproject.toml' - 'pdm.lock' - '.github/actions/setup-tox/**' + - '.github/actions/freebsd-vm/**' + - '.github/actions/pdm.conf' - '.github/workflows/lint.yml' concurrency: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 57a4f7e6..bafc4ac4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,8 @@ on: - 'pdm.lock' - '.github/codecov.yml' - '.github/actions/setup-tox/**' + - '.github/actions/freebsd-vm/**' + - '.github/actions/pdm.conf' - '.github/workflows/test.yml' push: branches: @@ -40,6 +42,8 @@ on: - 'pdm.lock' - '.github/codecov.yml' - '.github/actions/setup-tox/**' + - '.github/actions/freebsd-vm/**' + - '.github/actions/pdm.conf' - '.github/workflows/test.yml' concurrency: @@ -124,7 +128,7 @@ jobs: - python_version: '3.11' tox_py: py311 - name: test (freebsd-14, ${{ matrix.python_version }}) + name: test (freebsd-14.1, ${{ matrix.python_version }}) steps: - uses: actions/checkout@v4 with: diff --git a/tests/unit_test/test_async/test_asyncio_backend/test_stream.py b/tests/unit_test/test_async/test_asyncio_backend/test_stream.py index 926428fe..5befbe4d 100644 --- a/tests/unit_test/test_async/test_asyncio_backend/test_stream.py +++ b/tests/unit_test/test_async/test_asyncio_backend/test_stream.py @@ -356,6 +356,7 @@ async def test____serve____connect____error_raised( ) @PlatformMarkers.skipif_platform_win32_because("test failures are all too frequent on CI", skip_only_on_ci=True) + @PlatformMarkers.skipif_platform_bsd_because("test failures are all too frequent on CI", skip_only_on_ci=True) @pytest.mark.parametrize("errno_value", sorted(ACCEPT_CAPACITY_ERRNOS), ids=errno_errorcode.__getitem__) @pytest.mark.flaky(retries=3, delay=0.1) async def test____accept____accept_capacity_error( @@ -370,9 +371,9 @@ async def test____accept____accept_capacity_error( mock_tcp_listener_socket.accept.side_effect = OSError(errno_value, os.strerror(errno_value)) # Act - # It retries every 100 ms, so in 975 ms it will retry at 0, 100, ..., 900 + # It retries every 100 ms, so in 950 ms it will retry at 0, 100, ..., 900 # = 10 times total - with CancelScope(deadline=asyncio.get_running_loop().time() + 0.975): + with CancelScope(deadline=asyncio.get_running_loop().time() + 0.950): await listener.raw_accept() # Assert diff --git a/tests/unit_test/test_async/test_lowlevel_api/test_backend/test_common_tools/test_dns_resolver.py b/tests/unit_test/test_async/test_lowlevel_api/test_backend/test_common_tools/test_dns_resolver.py index eff9fc40..fe68f2cd 100644 --- a/tests/unit_test/test_async/test_lowlevel_api/test_backend/test_common_tools/test_dns_resolver.py +++ b/tests/unit_test/test_async/test_lowlevel_api/test_backend/test_common_tools/test_dns_resolver.py @@ -30,6 +30,7 @@ import pytest +from ......tools import PlatformMarkers from ....._utils import datagram_addrinfo_list, stream_addrinfo_list if TYPE_CHECKING: @@ -773,6 +774,7 @@ async def test____create_connection____getaddrinfo_return_mismatch( dns_resolver.mock_sock_connect.assert_not_called() +@PlatformMarkers.skipif_platform_bsd_because("test failures are all too frequent on CI", skip_only_on_ci=True) @pytest.mark.asyncio @pytest.mark.parametrize("connection_socktype", [SOCK_STREAM], indirect=True, ids=repr) @pytest.mark.flaky(retries=3) diff --git a/tests/unit_test/test_async/test_trio_backend/test_stream.py b/tests/unit_test/test_async/test_trio_backend/test_stream.py index 5af64c2d..ac3f37ba 100644 --- a/tests/unit_test/test_async/test_trio_backend/test_stream.py +++ b/tests/unit_test/test_async/test_trio_backend/test_stream.py @@ -661,6 +661,7 @@ async def test____serve____convert_trio_ClosedResourceError( handler.assert_not_awaited() @PlatformMarkers.skipif_platform_win32_because("test failures are all too frequent on CI", skip_only_on_ci=True) + @PlatformMarkers.skipif_platform_bsd_because("test failures are all too frequent on CI", skip_only_on_ci=True) @pytest.mark.parametrize("errno_value", sorted(ACCEPT_CAPACITY_ERRNOS), ids=errno.errorcode.__getitem__) @pytest.mark.flaky(retries=3, delay=0.1) async def test____accept____accept_capacity_error( @@ -678,9 +679,9 @@ async def test____accept____accept_capacity_error( mock_trio_socket_listener.accept.side_effect = OSError(errno_value, os.strerror(errno_value)) # Act - # It retries every 100 ms, so in 975 ms it will retry at 0, 100, ..., 900 + # It retries every 100 ms, so in 950 ms it will retry at 0, 100, ..., 900 # = 10 times total - with trio.CancelScope(deadline=trio.current_time() + 0.975): + with trio.CancelScope(deadline=trio.current_time() + 0.950): await listener.serve(handler) # Assert