Fix missing Tracing patch_file
#16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Patchright Chromium Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| run-playwright-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| - name: Install Playwright-Python Package | |
| run: | | |
| git clone https://github.com/microsoft/playwright-python --branch $(curl --silent "https://api.github.com/repos/Kaliiiiiiiiii-Vinyzu/patchright/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') | |
| cd playwright-python | |
| python -m pip install --upgrade pip | |
| pip install -r local-requirements.txt | |
| pip install -e . | |
| pip install black toml | |
| - name: Patch Playwright-Python Package | |
| run: | | |
| python patch_python_package.py | |
| python -m black playwright-python | |
| - name: Build Patchright-Python Package | |
| run: | | |
| cd playwright-python | |
| pip install -e . | |
| for wheel in $(python setup.py --list-wheels); do | |
| PLAYWRIGHT_TARGET_WHEEL=$wheel python -m build --wheel | |
| done | |
| - name: Install Local Patchright Package | |
| run: | | |
| cd playwright-python | |
| pip install dist/patchright-*-manylinux1_x86_64.whl | |
| - name: Install Playwright Browsers | |
| run: | | |
| python -m patchright install --with-deps chromium | |
| - name: Clone Playwright-Python Tests | |
| run: | | |
| cp -r playwright-python/tests ./tests | |
| - name: Modify Tests | |
| run: | | |
| python utils/modify_tests.py | |
| - name: Run Chromium Tests | |
| run: | | |
| xvfb-run pytest --browser=chromium --disable-warnings --timeout 90 tests/sync/ | |
| xvfb-run pytest --browser=chromium --disable-warnings --timeout 90 tests/async/ |