Add type-checking #36
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: Run Matrix Tests on Ubuntu | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| tests: | |
| name: "Python ${{ matrix.python-version }} on Ubuntu" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.13", "pypy-3.9"] | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| - name: Setup Cairo | |
| run: | | |
| sudo apt-get update && \ | |
| sudo apt-get install -y libcairo2-dev libffi-dev pkg-config libxml2-dev libxslt1-dev libjpeg-dev | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Create Virtual Environment | |
| run: uv venv | |
| - name: "Cache for wikipedia flags" | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: "cache-wikipedia-flags" | |
| with: | |
| path: "tests/samples/wikipedia/flags" | |
| key: "wikipedia-flags-${{ matrix.python-version }}-${{ matrix.os }}" | |
| - name: "Cache for wikipedia symbols" | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: "cache-wikipedia-symbols" | |
| with: | |
| path: "tests/samples/wikipedia/symbols" | |
| key: "wikipedia-symbols-${{ matrix.python-version }}-${{ matrix.os }}" | |
| - name: "Cache for w3c svg12 tinytestsuite" | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: "cache-w3c-svg12-tinytestsuite" | |
| with: | |
| path: "tests/samples/W3C_SVG_12_TinyTestSuite" | |
| key: "w3c-svg12-tinytestsuite-${{ matrix.python-version }}-${{ matrix.os }}" | |
| - name: "Install dependencies" | |
| run: uv pip install -e .[dev] | |
| - name: "Run tests for ${{ matrix.python-version }}" | |
| run: uv run pytest |