Skip to content

Commit

Permalink
Merge pull request #4 from danleyb2/master-pp
Browse files Browse the repository at this point in the history
Django-q2
  • Loading branch information
jnoortheen authored Jun 6, 2024
2 parents 33359c6 + 50712a5 commit b0bbb2d
Show file tree
Hide file tree
Showing 101 changed files with 5,203 additions and 3,154 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# flake8, black, isort
b1d000d007f3f77069719523268a0c6256dc0860
# move to ruff formatting/linting
ad4d24e17c9424b17cd8ae65c2def7ecc74e63c1
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/release-drafter.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
if: github.repository == 'django-q2/django-q2'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install gettext
python -m pip install pip setuptools django poetry
# compile messages to get .mo files
django-admin compilemessages
- name: Build and publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: poetry --build --username=__token__ --password=${{ secrets.PYPI_TOKEN }} publish
14 changes: 0 additions & 14 deletions .github/workflows/release_log.yml

This file was deleted.

75 changes: 58 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
name: tests
on: [ push, pull_request ]
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint with ruff
run: |
pipx install ruff==0.4.4
ruff format . --check && ruff check .
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
django: [ "2.2", "3.2" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
django: [ "4.2", "5.0"]
exclude:
# django 5.0 does not support 3.8 and 3.9
- python-version: "3.8"
django: "5.0"
- python-version: "3.9"
django: "5.0"
# django 4.2 does not support 3.12
- python-version: "3.12"
django: "4.2"

services:
disque:
image: efrecon/disque:1.0-rc1
Expand All @@ -32,29 +57,45 @@ jobs:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with Django ${{ matrix.django }}
run: |
python -m pip install --upgrade pip
pip install poetry
poetry add "django==${{ matrix.django }}"
poetry add "django==${{ matrix.django }}" --python=${{ matrix.python-version }}
poetry install -E testing
- name: Run Tests
run: |
poetry run pytest --cov=./django_q --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v1
env:
PYTHON: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON, DJANGO
fail_ci_if_error: true
- name: Build docs
MONGO_HOST: "127.0.0.1"
REDIS_HOST: "127.0.0.1"
- name: Upload to coveralls
run: |
poetry run sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html
python -m pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}-django-${{ matrix.django }}
COVERALLS_PARALLEL: true

finish:
needs: test
runs-on: ubuntu-latest
container: python:3.11-bookworm
steps:
- name: Upload to coveralls
run: |
python -m pip install --upgrade pip
python -m pip install coveralls flake8 black
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check flake8/black
run: |
flake8 .
black --check .
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

formats: all

python:
install:
- requirements: docs/requirements.txt
6 changes: 0 additions & 6 deletions .readthedocs.yml

This file was deleted.

Loading

0 comments on commit b0bbb2d

Please sign in to comment.