diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f1ca25e5..593e70c6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,31 +34,30 @@ jobs: if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true' run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV - - name: Install poetry + - name: Install uv if: env.PUBLISH == 'true' - run: pipx install "poetry==1.8.4" + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 if: env.PUBLISH == 'true' - with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' + run: uv python install ${{ matrix.python-version }} - name: Install dependencies [w/ docs] if: env.PUBLISH == 'true' - run: poetry install --with docs,lint + run: uv sync --all-extras --dev - name: Print python versions if: env.PUBLISH == 'true' run: | python -V - poetry run python -V + uv run python -V - name: Build documentation if: env.PUBLISH == 'true' run: | - pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd + pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd - name: Push documentation to S3 if: env.PUBLISH == 'true' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 43bf27c5..5130c2ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,36 +17,36 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install poetry - run: pipx install 'poetry==1.8.4' + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' + run: uv python install ${{ matrix.python-version }} - name: Install dependencies - run: | - poetry install --with=docs,test,coverage,lint - poetry run pip install DJANGO~=${{ matrix.django-version }} + run: uv sync --all-extras --dev + + - name: Install django + run: uv run pip install DJANGO~=${{ matrix.django-version }} - name: Print python versions run: | python -V - poetry run python -V + uv run python -V - name: Lint with ruff check - run: poetry run ruff check . + run: uv run ruff check . - name: Format with ruff format - run: poetry run ruff format . --check + run: uv run ruff format . --check - name: Lint with mypy - run: poetry run mypy . + run: uv run mypy . - name: Test with pytest - run: poetry run py.test --cov=./ --cov-report=xml + run: uv run py.test --cov=./ --cov-report=xml - uses: codecov/codecov-action@v5 with: @@ -64,21 +64,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install poetry - run: pipx install "poetry==1.8.4" + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' + run: uv python install ${{ matrix.python-version }} - name: Build package - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - run: poetry build + run: uv build + - name: Publish package - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__