Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1360336?usp=email )
Change subject: Revert "tests: temporary deactivate WMCS SOCKS tunnel"
......................................................................
Revert "tests: temporary deactivate WMCS SOCKS tunnel"
This reverts commit 906be7d1d97d2086aa9e977265dc5da844863a33.
Reason for revert: Should work again, see T442175#12485808
Bug: T442175
Change-Id: I3fad646788e5a9acc4f068ee0b5500551f00eaeb
---
M .github/actions/wmcs-socks/action.yml
M .github/workflows/doctest.yml
M .github/workflows/graalpy_tests.yml
M .github/workflows/login_tests-ci.yml
M .github/workflows/oauth_tests-ci.yml
M .github/workflows/pywikibot-ci.yml
M .github/workflows/windows_tests.yml
7 files changed, 67 insertions(+), 1 deletion(-)
Approvals:
Xqt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/.github/actions/wmcs-socks/action.yml
b/.github/actions/wmcs-socks/action.yml
index 3d63a8b..f78cd38 100644
--- a/.github/actions/wmcs-socks/action.yml
+++ b/.github/actions/wmcs-socks/action.yml
@@ -12,4 +12,46 @@
runs:
using: composite
- steps: [] # temporary deactivated due to T442175
+ steps:
+ - name: Setup SSH directory
+ shell: bash
+ run: |
+ set -euo pipefail
+ mkdir -p ~/.ssh
+ - name: Install SSH key
+ shell: bash
+ run: |
+ set -euo pipefail
+ printf "%s" "${{ inputs.ssh_key }}" > ~/.ssh/id_ed25519
+ chmod 600 ~/.ssh/id_ed25519
+ - name: Add known hosts
+ shell: bash
+ run: |
+ set -euo pipefail
+ ssh-keyscan bastion.wmcloud.org >> ~/.ssh/known_hosts
+ - name: Start SOCKS tunnel
+ shell: bash
+ run: |
+ set -euo pipefail
+ ssh \
+ -o StrictHostKeyChecking=accept-new \
+ -o ExitOnForwardFailure=yes \
+ -o ServerAliveInterval=30 \
+ -o ServerAliveCountMax=3 \
+ -o ConnectTimeout=10 \
+ -N \
+ -D 127.0.0.1:1080 \
+ -i ~/.ssh/id_ed25519 \
+ "${{ inputs.ssh_user }}@bastion.wmcloud.org" &
+ echo $! > ssh.pid
+ echo "SSH tunnel started with PID $(cat ssh.pid)"
+ - name: Show proxy connection
+ shell: bash
+ run: |-
+ set -euo pipefail
+ echo "Local IP:"
+ curl -s https://api.ipify.org
+ echo
+ echo "Proxy IP:"
+ curl --proxy socks5h://127.0.0.1:1080 -s https://api.ipify.org
+ echo
diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml
index d85b527..f1cb043 100644
--- a/.github/workflows/doctest.yml
+++ b/.github/workflows/doctest.yml
@@ -85,6 +85,10 @@
env:
# Force GIL "off" due to mwparserfromhell issue as suggested by
warning in T412624
PYTHON_GIL: ${{ endsWith(matrix.python-version, 't') && '0' || '1' }}
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
pytest --version
diff --git a/.github/workflows/graalpy_tests.yml
b/.github/workflows/graalpy_tests.yml
index 22698c7..ce23ddd 100644
--- a/.github/workflows/graalpy_tests.yml
+++ b/.github/workflows/graalpy_tests.yml
@@ -69,6 +69,10 @@
PYTHONWARNINGS: ignore:urllib3 v2 only supports OpenSSL
PYTHONIOENCODING: utf-8
PYWIKIBOT_TEST_NO_RC: 1
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
echo "Running tests with GraalPy native coverage"
diff --git a/.github/workflows/login_tests-ci.yml
b/.github/workflows/login_tests-ci.yml
index 1ff1c52..741e2d1 100644
--- a/.github/workflows/login_tests-ci.yml
+++ b/.github/workflows/login_tests-ci.yml
@@ -130,6 +130,10 @@
continue-on-error: true
timeout-minutes: 2
env:
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
coverage run -m unittest -vv tests/site_login_logout_tests.py
diff --git a/.github/workflows/oauth_tests-ci.yml
b/.github/workflows/oauth_tests-ci.yml
index e0757f8..1b9beca 100644
--- a/.github/workflows/oauth_tests-ci.yml
+++ b/.github/workflows/oauth_tests-ci.yml
@@ -129,6 +129,10 @@
PYWIKIBOT_TEST_WRITE: 1
PYWIKIBOT_TEST_OAUTH: ${{ secrets[format('{0}',
steps.token.outputs.uppercase)] }}
PYWIKIBOT_TEST_MODULES: edit_failure,file,oauth,superset
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
coverage run -m unittest -vv
diff --git a/.github/workflows/pywikibot-ci.yml
b/.github/workflows/pywikibot-ci.yml
index 8df68b8..0a8ab12 100644
--- a/.github/workflows/pywikibot-ci.yml
+++ b/.github/workflows/pywikibot-ci.yml
@@ -145,6 +145,10 @@
PYWIKIBOT_TEST_DEFAULT_ONLY: ${{ (matrix.site == 'wikisource:zh' ||
matrix.test_default_only) && 1 || 0 }}
# Force GIL "off" due to mwparserfromhell issue as suggested by
warning in T412624
PYTHON_GIL: ${{ endsWith(matrix.python-version, 't') && '0' || '1' }}
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
if [ "${{ matrix.site }}" != "wikisource:zh" ] ||
diff --git a/.github/workflows/windows_tests.yml
b/.github/workflows/windows_tests.yml
index d148d14..359a0fd 100644
--- a/.github/workflows/windows_tests.yml
+++ b/.github/workflows/windows_tests.yml
@@ -87,6 +87,10 @@
continue-on-error: true
env:
PYTHONIOENCODING: utf-8
+ HTTP_PROXY: socks5h://127.0.0.1:1080
+ HTTPS_PROXY: socks5h://127.0.0.1:1080
+ ALL_PROXY: socks5h://127.0.0.1:1080
+ NO_PROXY: ""
run: |
python pwb.py version
coverage run -m unittest discover -vv -p \"*_tests.py\";
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1360336?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3fad646788e5a9acc4f068ee0b5500551f00eaeb
Gerrit-Change-Number: 1360336
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]