Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #19

Merged
merged 18 commits into from
Sep 18, 2024
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ jobs:
django-version: ["4.2", "5.0", "5.1"]
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
allow-prereleases: true
- name: Install dependencies
run: |
pip install '.[tests]'
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --no-dev --extra test

- name: Install Specific Django ${{ matrix.django-version }}
run: uv add django~=${{ matrix.django-version }}

- name: Run tests
run: |
pytest
run: uv run --with django~=${{ matrix.django-version }} pytest

deploy:
runs-on: ubuntu-latest
needs: [test]
Expand All @@ -37,17 +40,18 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install setuptools wheel build
run: uv python install

- name: Install the project
run: uv sync --no-dev

- name: Build
run: |
python -m build
run: uv build

- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
24 changes: 13 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ jobs:
django-version: ["4.2", "5.0", "5.1"]
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
allow-prereleases: true
- name: Install dependencies
run: |
pip install '.[tests]'
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --no-dev --extra test

- name: Install Specific Django ${{ matrix.django-version }}
run: uv add django~=${{ matrix.django-version }}

- name: Run tests
run: |
pytest
run: uv run --with django~=${{ matrix.django-version }} pytest
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.11
python: python3.12

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -19,7 +19,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.5
rev: v0.6.5
hooks:
- id: ruff
args: [--fix]
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"python.testing.pytestArgs": ["tests", "-v"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"python.analysis.exclude": ["**/build/**", "**/.tox/**", "**/.venv/**"]
}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ If you choose to use this package prior to version 1.x being release, please pin

```python
INSTALLED_APPS = [
...
# ...
"djpress.apps.DjpressConfig",
...
# ...
]
```

- Add the URLs to your project's main `urls.py` file.

```python
from django.urls import path, include

urlpatterns = [
...
# ...
path("", include("djpress.urls")),
...
# ...
]
```

Expand Down
Loading