Install qemu on ci #317
Workflow file for this run
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 tests | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| test: | |
| name: Test, lint, format check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Create docker image | |
| run: docker create --name images lukaszkostka/librouteros_images:latest /dev/null | |
| - name: Move vm images | |
| run: docker cp images:/opt/. $GITHUB_WORKSPACE/images/ | |
| - name: Remove docker image | |
| run: docker rm images | |
| - name: Update apt | |
| run: sudo apt-get update | |
| - name: Install packages | |
| run: > | |
| sudo apt-get install -y --no-install-recommends --no-install-suggests | |
| qemu-system-i386 | |
| qemu-utils | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install library | |
| run: uv sync --all-extras --dev | |
| - name: Run Ruff | |
| run: uv run ruff check . | |
| - name: Type check | |
| run: uv run mypy src | |
| - name: Format | |
| run: > | |
| uv run ruff format --diff | |
| src | |
| tests | |
| - name: Unit tests | |
| run: uv run pytest tests/unit | |
| - name: Integration tests | |
| timeout-minutes: 20 | |
| run: uv run pytest -n 2 tests/integration |