Skip to content

Commit

Permalink
Create Issue8649-2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathrajsrinivasan authored Aug 7, 2024
1 parent 4623166 commit 9649eb4
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/Issue8649-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Testing Issue 8649

on:
workflow_dispatch:

jobs:
test-macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'macos-12', 'macos-13', 'macos-14']
try: ['0', '1', '2']

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: python.socket (before)
shell: python
run: |
print(
'Linux: Expecting gethostname to return the same as "hostname"'
' and the other interfaces to return the same as "hostname -f"'
'\n\n'
'Mac OS: Expect *ipv6.arpa addresses due to a longstanding'
' Python bug\n\n'
)
import socket
for expr in (
'socket.gethostname()',
'socket.getfqdn()',
'socket.getfqdn(socket.gethostname())',
'socket.getfqdn(socket.getfqdn())',
'socket.gethostbyname_ex(socket.gethostname())[0]',
'socket.gethostbyname_ex(socket.getfqdn())[0]'
):
try:
result = eval(expr)
except Exception as exc:
result = str(exc)
print(f'{expr:50}: {result}')
- name: Get value of /etc/hosts
run: |
sudo cat /etc/hosts

0 comments on commit 9649eb4

Please sign in to comment.