-"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: \"3.9\"\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy .\n - name: Minimize uv cache\n run: uv cache prune --ci\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v4\n - name: Set up uv ubuntu/mac\n if: ${ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }\n run: curl -LsSf https://astral.sh/uv/install.sh | sh\n - name: Set up uv windows\n if: ${ matrix.os == 'windows-latest' }\n run: irm https://astral.sh/uv/install.ps1 | iex\n shell: powershell\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Restore uv cache\n uses: actions/cache@v4\n with:\n path: ${ env.UV_CACHE_DIR }\n key: uv-${ runner.os }-${ hashFiles('uv.lock') }\n restore-keys: |\n uv-${ runner.os }-${ hashFiles('uv.lock') }\n uv-${ runner.os }\n - name: Install Dependencies\n run: uv sync --locked\n - name: Test with pytest\n run: uv run pytest\n - name: Minimize uv cache\n run: uv cache prune --ci\n"
0 commit comments