🏡 index : quine-global-labs/mirror-cockpit-project-cockpit.git

name: tox
on:
  pull_request:
jobs:
  venv:
    permissions: {}

    runs-on: ubuntu-latest
    container: registry.fedoraproject.org/fedora:latest

    timeout-minutes: 20

    env:
      TOX_WORK_DIR: /tmp/.tox
      COVERAGE_FILE: /tmp/.coverage
      RUFF_CACHE_DIR: /tmp/.ruff_cache
      MYPY_CACHE_DIR: /tmp/.mypy_cache

    steps:
      - name: Install tox dependencies
        run: |
          dnf install -y git-core tox util-linux python3.6
          useradd tox

      # https://github.blog/2022-04-12-git-security-vulnerability-announced/
      - name: Pacify git's permission check
        run: git config --global --add safe.directory /__w/cockpit/cockpit

      - name: Clone repository
        uses: actions/checkout@v7

      - name: Checkout submodules
        run: vendor/checkout

      - name: Run venv tests
        run: runuser -u tox -- tox --colored=yes -m venv -- --color=yes