diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 5f62c3d..d3ea6c4 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - uv-version: ["0.1.12", "0.3.0", ""] + uv-version: ["0.3.0", "latest"] os: [macos-latest, ubuntu-latest, windows-latest] cache: [true, false] fail-fast: true @@ -53,6 +53,8 @@ jobs: which python - name: Check inside virtual environment run: python -c "import sys; exit(0 if sys.prefix != sys.base_prefix else 1)" + - name: init Project + run: uv init - name: Install Pydantic and Ruff run: | uv add pydantic ruff @@ -71,50 +73,3 @@ jobs: Get-ChildItem -Force ${{ env.UV_CACHE_DIR || '$env:TEMP\.uv-cache' }} echo "Checking for Pydantic and Ruff in cache" Get-ChildItem -Recurse ${{ env.UV_CACHE_DIR || '$env:TEMP\.uv-cache' }} | Where-Object { $_.Name -like "*pydantic*" -or $_.Name -like "*ruff*" } - - test-cache-behavior: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Test cache with unsupported version (expected to fail) - uses: ./ - with: - uv-version: "0.2.9" - uv-cache: true - continue-on-error: true - - name: Verify failure for unsupported version - run: | - if [ $? -eq 0 ]; then - echo "Action succeeded when it should have failed" - exit 1 - fi - - name: Test cache with supported version (expected to fail) - uses: ./ - with: - uv-version: "0.3.0" - uv-cache: true - continue-on-error: true - - name: Verify failure for supported version with cache - run: | - if [ $? -eq 0 ]; then - echo "Action succeeded when it should have failed" - exit 1 - fi - - name: Test no cache when not requested (expected to succeed) - uses: ./ - with: - uv-version: "0.3.0" - uv-cache: false - - name: Verify success for no cache - run: | - if [ $? -ne 0 ]; then - echo "Action failed when it should have succeeded" - exit 1 - fi - if [ -d "$UV_CACHE_DIR" ]; then - echo "Cache directory exists when it shouldn't" - exit 1 - fi \ No newline at end of file