diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02dda87953..fabc57b9c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,31 @@ jobs: name: macOS (${{ matrix.python }}) flags: macOS,${{ matrix.python }} + # run CI on a musl linux + Alpine: + name: "Alpine" + runs-on: ubuntu-latest + container: alpine + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install necessary packages + # can't use setup-python because that python doesn't seem to work; + # `python3-dev` (rather than `python:alpine`) for some ctypes reason, + # `nodejs` for pyright (`node-env` pulls in nodejs but that takes a while and can time out the test). + run: apk update && apk add python3-dev bash nodejs + - name: Enter virtual environment + run: python -m venv .venv + - name: Run tests + run: source .venv/bin/activate && ./ci.sh + - if: always() + uses: codecov/codecov-action@v3 + with: + directory: empty + token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46 + name: Alpine + flags: Alpine,3.12 + # https://github.com/marketplace/actions/alls-green#why check: # This job does nothing and is only used for the branch protection @@ -188,6 +213,7 @@ jobs: - Windows - Ubuntu - macOS + - Alpine runs-on: ubuntu-latest diff --git a/src/trio/_tests/test_socket.py b/src/trio/_tests/test_socket.py index 61914ce026..20841172bb 100644 --- a/src/trio/_tests/test_socket.py +++ b/src/trio/_tests/test_socket.py @@ -624,8 +624,8 @@ async def res( sock.setsockopt(tsocket.IPPROTO_IPV6, tsocket.IPV6_V6ONLY, True) with pytest.raises(tsocket.gaierror) as excinfo: await res(("1.2.3.4", 80)) - # Windows, macOS - expected_errnos = {tsocket.EAI_NONAME} + # Windows, macOS, musl/Linux + expected_errnos = {tsocket.EAI_NONAME, tsocket.EAI_NODATA} # Linux if hasattr(tsocket, "EAI_ADDRFAMILY"): expected_errnos.add(tsocket.EAI_ADDRFAMILY)