1. Clear screen

clear

2. Navigate to hello-uv folder

cd C:\MyDemos\hello-uv

3. Anatomy of a CI workflow

New-Item -ItemType Directory -Force -Path .github\workflows | Out-Null

@'
name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          enable-cache: true

      - name: Sync dependencies
        run: uv sync --frozen --all-groups

      - name: Run tests
        run: uv run pytest
'@ | Set-Content -Encoding utf8 .github\workflows\ci.yml

Get-Content .github\workflows\ci.yml

4. Run the CI commands locally

uv sync --frozen --all-groups

5. Cold-cache benchmark setup

Remove-Item -Recurse -Force .venv

uv cache clean

6. The cold-cache install

Measure-Command { uv sync --frozen --all-groups } | Select-Object TotalSeconds