Skip to content

Commit

Permalink
!squash more
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 25, 2024
1 parent 75d8ae5 commit 5999780
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 32 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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__
Expand Down

0 comments on commit 5999780

Please sign in to comment.