67 lines
2.4 KiB
YAML
67 lines
2.4 KiB
YAML
name: Temporary post-modularization regression fixes
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- fix/post-modularization-regressions
|
|
paths:
|
|
- tools/apply_post_modularization_fixes.py
|
|
- tools/repair_post_modularization_patcher.py
|
|
- .github/workflows/temp-post-modularization-fixes.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
fix-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: fix/post-modularization-regressions
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Install dependencies on Python 3.9
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements.txt
|
|
python -m pip install filelock
|
|
- name: Repair, validate, and apply fixes
|
|
run: |
|
|
python -m py_compile \
|
|
tools/repair_post_modularization_patcher.py \
|
|
tools/apply_post_modularization_fixes.py
|
|
python tools/repair_post_modularization_patcher.py
|
|
python -m py_compile tools/apply_post_modularization_fixes.py
|
|
python tools/repair_post_modularization_patcher.py
|
|
python -m py_compile tools/apply_post_modularization_fixes.py
|
|
python tools/apply_post_modularization_fixes.py
|
|
python -m compileall -q .
|
|
- name: Run full suite on Python 3.9
|
|
run: python -m unittest discover -s tests -p 'test_*.py'
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Install dependencies on Python 3.12
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements.txt
|
|
python -m pip install filelock
|
|
- name: Run full suite on Python 3.12
|
|
run: |
|
|
python -m compileall -q .
|
|
python -m unittest discover -s tests -p 'test_*.py'
|
|
- name: Commit verified fixes and cleanup
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git rm -f \
|
|
tools/apply_post_modularization_fixes.py \
|
|
tools/repair_post_modularization_patcher.py \
|
|
.github/workflows/temp-post-modularization-fixes.yml
|
|
git add -A
|
|
git commit -m "fix: resolve post-modularization regressions"
|
|
git push origin HEAD:fix/post-modularization-regressions
|