From cb90d7002d0410d60f07fd25c87866182f20887c Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Tue, 3 Sep 2024 21:44:02 -0500 Subject: [PATCH] update tests --- .github/workflows/tests.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4df1860c..02908652 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,27 +15,42 @@ jobs: strategy: matrix: python-version: + - "3.9" - "3.10" - "3.11" + - "3.12" fail-fast: false steps: - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 + id: setup_python with: python-version: ${{ matrix.python-version }} - cache: pip - cache-dependency-path: requirements*.txt - - name: Install dependencies + - name: UV Cache + # Manually cache the uv cache directory + # until setup-python supports it: + # https://github.com/actions/setup-python/issues/822 + uses: actions/cache@v4 + id: cache-uv + with: + path: ~/.cache/uv + key: uvcache-${{ runner.os }}-${{ hashFiles('requirements.txt') }} + + - name: Install packages run: | - python -m pip install --upgrade pip - python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]" + python -m pip install -U uv + uv pip install --upgrade --system -e .[dev] - name: Run tests env: PREFECT_SERVER_DATABASE_CONNECTION_URL: "sqlite+aiosqlite:///./collection-tests.db" run: | - coverage run --branch -m pytest tests -vv - coverage report \ No newline at end of file + pytest -vv \ No newline at end of file