diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a33c5c4..9d85a275 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,21 +15,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Set up Python and uv + uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 - cache: "pip" # caching pip dependencies - cache-dependency-path: | - pyproject.toml - requirements-dev.txt + python-version: "3.11" - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Lint package run: | @@ -45,21 +40,16 @@ jobs: python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - name: Set up Python and uv + uses: drivendataorg/setup-python-uv-action@v1 with: python-version: ${{ matrix.python-version }} - cache: "pip" # caching pip dependencies - cache-dependency-path: | - pyproject.toml - requirements-dev.txt - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Run mocked tests run: | @@ -69,14 +59,14 @@ jobs: shell: bash run: | make dist - python -m pip install dist/cloudpathlib-*.whl --no-deps --force-reinstall + uv pip install cloudpathlib@$(find dist -name 'cloudpathlib*.whl') --no-deps --force-reinstall python -c "import cloudpathlib" - python -m pip install dist/cloudpathlib-*.tar.gz --no-deps --force-reinstall + uv pip install cloudpathlib@$(find dist -name 'cloudpathlib*.tar.gz') --no-deps --force-reinstall python -c "import cloudpathlib" - name: Upload coverage to codecov if: matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml @@ -88,21 +78,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Set up Python and uv + uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 - cache: "pip" # caching pip dependencies - cache-dependency-path: | - pyproject.toml - requirements-dev.txt + python-version: "3.11" - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v0.2.0 @@ -127,8 +112,9 @@ jobs: CUSTOM_S3_ENDPOINT: ${{secrets.CUSTOM_S3_ENDPOINT}} - name: Upload coverage to codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml fail_ci_if_error: true @@ -148,30 +134,26 @@ jobs: extra: "gs" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Set up Python and uv + uses: drivendataorg/setup-python-uv-action@v1 with: - python-version: 3.8 - cache: "pip" - cache-dependency-path: | - pyproject.toml - requirements-dev.txt + python-version: "3.11" - name: Build cloudpathlib run: | - pip install --upgrade pip build + uv pip install build make dist # build cloudpathlib wheel - name: Create empty venv run: | - python -m venv ${{ matrix.extra }}-env + uv venv ${{ matrix.extra }}-env - name: Install cloudpathlib[${{ matrix.extra }}] run: | source ${{ matrix.extra }}-env/bin/activate - pip install "$(find dist -name 'cloudpathlib*.whl')[${{ matrix.extra }}]" + uv pip install "cloudpathlib[${{ matrix.extra }}]@$(find dist -name 'cloudpathlib*.whl')" - name: Test ${{ matrix.extra }} usage run: |