ci: switch to python3 for all checks
All checks were successful
CI / syntax-check (push) Successful in 6s
CI / memory-leak-check (push) Successful in 18s

This commit is contained in:
Username
2025-12-24 01:00:28 +01:00
parent ec861d94c4
commit c6dca3e51b

View File

@@ -16,36 +16,24 @@ jobs:
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
- name: Python 2 syntax check
- name: Python syntax check
run: |
echo "Checking Python 2 syntax..."
echo "Checking Python syntax..."
failed=0
for f in ppf.py proxywatchd.py scraper.py httpd.py \
config.py dbs.py fetch.py connection_pool.py \
engines.py translations.py http2.py \
mysqlite.py misc.py comboparse.py soup_parser.py; do
if [ -f "$f" ]; then
if python2 -m py_compile "$f" 2>/dev/null; then
echo "OK $f"
else
echo "FAIL $f"
failed=1
fi
for f in *.py; do
if python3 -m py_compile "$f" 2>&1; then
echo "OK $f"
else
echo "FAIL $f"
failed=1
fi
done
exit $failed
- name: Python 3 syntax check
run: |
echo "Checking Python 3 syntax..."
for f in *.py; do
python3 -m py_compile "$f" 2>/dev/null && echo "OK $f" || echo "WARN $f"
done
memory-leak-check:
runs-on: dotfiles
container:
image: python:2.7-slim
image: python:3-slim
steps:
- name: Checkout
run: |
@@ -53,10 +41,6 @@ jobs:
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
- name: Install dependencies
run: |
pip install --quiet objgraph || true
- name: Check for memory leak patterns
run: |
echo "Scanning for common memory leak patterns..."
@@ -109,7 +93,7 @@ jobs:
- name: Static import check
run: |
echo "Verifying imports..."
cd . && python2 -c "import sys; sys.path.insert(0,'.'); import config; print('OK config')" || echo "FAIL config"
cd . && python2 -c "import sys; sys.path.insert(0,'.'); import misc; print('OK misc')" || echo "FAIL misc"
cd . && python2 -c "import sys; sys.path.insert(0,'.'); import mysqlite; print('OK mysqlite')" || echo "FAIL mysqlite"
python3 -c "import sys; sys.path.insert(0,'.'); import config; print('OK config')" || echo "FAIL config"
python3 -c "import sys; sys.path.insert(0,'.'); import misc; print('OK misc')" || echo "FAIL misc"
python3 -c "import sys; sys.path.insert(0,'.'); import mysqlite; print('OK mysqlite')" || echo "FAIL mysqlite"