mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-09-26 13:30:13 +00:00
Use in-memory backends for Celery in tests and workflows
At the moment, this doesn't have much of an effect since most task calls are mock'd out.
This commit is contained in:
parent
a659661b24
commit
7e6ba93833
3 changed files with 11 additions and 31 deletions
10
.github/workflows/django-tests.yml
vendored
10
.github/workflows/django-tests.yml
vendored
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
name: Run Python Tests
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -53,9 +54,8 @@ jobs:
|
|||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: github_actions
|
||||
POSTGRES_HOST: 127.0.0.1
|
||||
CELERY_BROKER: ""
|
||||
REDIS_BROKER_PORT: 6379
|
||||
REDIS_BROKER_PASSWORD: beep
|
||||
CELERY_BROKER_URL: memory://
|
||||
CELERY_RESULT_BACKEND: cache+memory://
|
||||
USE_DUMMY_CACHE: true
|
||||
FLOWER_PORT: 8888
|
||||
EMAIL_HOST: "smtp.mailgun.org"
|
||||
|
|
25
.github/workflows/mypy.yml
vendored
25
.github/workflows/mypy.yml
vendored
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
name: Mypy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -24,27 +25,9 @@ jobs:
|
|||
- name: Analysing the code with mypy
|
||||
env:
|
||||
SECRET_KEY: beepbeep
|
||||
DEBUG: false
|
||||
USE_HTTPS: true
|
||||
DOMAIN: your.domain.here
|
||||
BOOKWYRM_DATABASE_BACKEND: postgres
|
||||
MEDIA_ROOT: images/
|
||||
POSTGRES_PASSWORD: hunter2
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: github_actions
|
||||
POSTGRES_HOST: 127.0.0.1
|
||||
CELERY_BROKER: ""
|
||||
REDIS_BROKER_PORT: 6379
|
||||
REDIS_BROKER_PASSWORD: beep
|
||||
USE_DUMMY_CACHE: true
|
||||
FLOWER_PORT: 8888
|
||||
EMAIL_HOST: "smtp.mailgun.org"
|
||||
EMAIL_PORT: 587
|
||||
EMAIL_HOST: ""
|
||||
EMAIL_HOST_USER: ""
|
||||
EMAIL_HOST_PASSWORD: ""
|
||||
EMAIL_USE_TLS: true
|
||||
ENABLE_PREVIEW_IMAGES: false
|
||||
ENABLE_THUMBNAIL_GENERATION: true
|
||||
HTTP_X_FORWARDED_PROTO: false
|
||||
run: |
|
||||
mypy bookwyrm celerywyrm
|
||||
|
|
|
@ -12,11 +12,8 @@ env =
|
|||
DOMAIN = your.domain.here
|
||||
BOOKWYRM_DATABASE_BACKEND = postgres
|
||||
MEDIA_ROOT = images/
|
||||
CELERY_BROKER = ""
|
||||
REDIS_BROKER_PORT = 6379
|
||||
REDIS_BROKER_PASSWORD = beep
|
||||
REDIS_ACTIVITY_PORT = 6379
|
||||
REDIS_ACTIVITY_PASSWORD = beep
|
||||
CELERY_BROKER_URL = memory://
|
||||
CELERY_RESULT_BACKEND = cache+memory://
|
||||
USE_DUMMY_CACHE = true
|
||||
FLOWER_PORT = 8888
|
||||
EMAIL_HOST = "smtp.mailgun.org"
|
||||
|
|
Loading…
Reference in a new issue