bookwyrm-mastodon/.github/workflows/django-tests.yml

60 lines
1.4 KiB
YAML
Raw Normal View History

2020-11-27 14:37:06 -05:00
name: Run Python Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
2021-08-01 00:42:37 -04:00
image: postgres:13
2020-11-27 14:37:06 -05:00
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: hunter2
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
2021-08-01 00:42:37 -04:00
- name: Set up Python
2020-11-27 14:37:06 -05:00
uses: actions/setup-python@v2
with:
2021-08-01 00:42:37 -04:00
python-version: 3.9
2020-11-27 14:37:06 -05:00
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
env:
SECRET_KEY: beepbeep
2021-08-01 10:38:16 -04:00
DEBUG: false
2021-08-06 21:13:51 -04:00
USE_HTTPS: true
2020-11-27 14:37:06 -05:00
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
2022-01-05 12:32:10 -05:00
REDIS_BROKER_PASSWORD: beep
2022-01-06 14:40:27 -05:00
USE_DUMMY_CACHE: true
FLOWER_PORT: 8888
2020-11-27 14:37:06 -05:00
EMAIL_HOST: "smtp.mailgun.org"
EMAIL_PORT: 587
EMAIL_HOST_USER: ""
EMAIL_HOST_PASSWORD: ""
EMAIL_USE_TLS: true
2021-08-02 19:05:40 -04:00
ENABLE_PREVIEW_IMAGES: false
2020-11-27 14:37:06 -05:00
run: |
2021-08-02 15:34:18 -04:00
pytest -n 3