Skip to content

Commit

Permalink
Merge pull request #19 from stuartmaxwell/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmaxwell authored Sep 18, 2024
2 parents 14dcadf + 9055c94 commit a8919f3
Show file tree
Hide file tree
Showing 44 changed files with 1,619 additions and 139 deletions.
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

0 comments on commit a8919f3

Please sign in to comment.