Skip to content

Commit bd4b687

Browse files
committed
CI: Adjust /etc/hosts on Linux
1 parent 44a67c6 commit bd4b687

22 files changed

+352
-0
lines changed

.github/workflows/test-x64-macos-2.7.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-3.5.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-3.6.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-3.7.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-3.8.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-pypy2.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-macos-pypy3.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-2.7.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-3.5.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-3.6.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-3.7.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-3.8.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-pypy2.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-ubuntu-pypy3.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-windows-2.7.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-windows-3.5.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

.github/workflows/test-x64-windows-3.6.yml

+16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ jobs:
3333
shell: bash
3434
run: python -c "import sys; print(sys.version)"
3535

36+
- name: "Setup /etc/hosts for Linux"
37+
shell: bash
38+
run: |
39+
if [ `uname` = "Linux" ]; then
40+
echo "\$ cat /etc/hosts"
41+
cat /etc/hosts
42+
echo
43+
(
44+
echo "127.0.0.1 localhost";
45+
echo "::1 localhost ip6-localhost ip6-loopback";
46+
) | sudo tee /etc/hosts
47+
echo
48+
echo "\$ cat /etc/hosts"
49+
cat /etc/hosts
50+
fi
51+
3652
- name: Resolve localhost
3753
shell: bash
3854
run: |

0 commit comments

Comments
 (0)