Fix Paint widget width/height and init_image sizing #425
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: Python tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Pytest (unit tests) | |
| run: | | |
| python -m pip install --upgrade uv | |
| uv venv | |
| uv pip install -e ".[test]" | |
| uv run pytest --ignore=tests/test_browser | |
| browser-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade uv | |
| uv venv | |
| uv pip install -e ".[test-browser]" | |
| - name: Get Playwright version | |
| id: pw-version | |
| run: echo "version=$(uv run python -c 'import playwright; print(playwright.__version__)')" >> "$GITHUB_OUTPUT" | |
| - name: Cache Playwright browsers | |
| id: pw-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.pw-version.outputs.version }}-chromium | |
| - name: Install Playwright browsers | |
| if: steps.pw-cache.outputs.cache-hit != 'true' | |
| run: uv run playwright install chromium --with-deps | |
| - name: Install Playwright system deps | |
| if: steps.pw-cache.outputs.cache-hit == 'true' | |
| run: uv run playwright install-deps chromium | |
| - name: Pytest (browser tests) | |
| run: uv run pytest tests/test_browser -v |