forked from lamby/django-debug-toolbar-user-panel
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is copied over from Django Lightweight Queue, with light modifications.
- Loading branch information
1 parent
b43703c
commit 85b7785
Showing
3 changed files
with
95 additions
and
116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
django-version: ["3.2", "4.0", "4.1", "4.2", "5.0"] | ||
exclude: | ||
# Python 3.11 is not supported until Django 4.1 | ||
- python-version: "3.11" | ||
django-version: "3.2" | ||
- python-version: "3.11" | ||
django-version: "4.0" | ||
|
||
# Python <3.10 is not supported by Django 5.0+ | ||
- python-version: "3.8" | ||
django-version: "5.0" | ||
- python-version: "3.9" | ||
django-version: "5.0" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Poetry | ||
run: pipx install poetry==1.3.2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
|
||
- name: Set up dependencies | ||
run: | | ||
poetry install | ||
poetry run pip install "django~=${{ matrix.django-version }}.0" | ||
- name: Run tests | ||
run: poetry run ./runtests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Create Release & Publish to PYPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
run-checks: | ||
uses: ./.github/workflows/check.yml | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- run-checks | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# work around actions/checkout stripping annotations https://github.com/actions/checkout/issues/290 | ||
- name: Fetch tags | ||
run: git fetch --tags --force | ||
|
||
- name: Set up Poetry | ||
run: pipx install poetry==1.3.2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: poetry | ||
|
||
- name: Build | ||
run: poetry build | ||
|
||
- name: Publish to PyPI | ||
run: | | ||
poetry publish \ | ||
--username "${PYPI_USERNAME}" \ | ||
--password "${PYPI_PASSWORD}" \ | ||
--no-interaction | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
body: ${{ steps.tag_data.outputs.git-tag-annotation }} |