mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Merge pull request #1235 from bookwyrm-social/test-speed
Tweaks for test CI
This commit is contained in:
commit
7980d74b01
2 changed files with 6 additions and 18 deletions
23
.github/workflows/django-tests.yml
vendored
23
.github/workflows/django-tests.yml
vendored
|
@ -9,18 +9,9 @@ jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
db: [postgres]
|
|
||||||
python-version: [3.9]
|
|
||||||
include:
|
|
||||||
- db: postgres
|
|
||||||
db_port: 5432
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12
|
image: postgres:13
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: hunter2
|
POSTGRES_PASSWORD: hunter2
|
||||||
|
@ -33,22 +24,18 @@ jobs:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: 3.9
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
env:
|
env:
|
||||||
DB: ${{ matrix.db }}
|
|
||||||
DB_HOST: 127.0.0.1
|
|
||||||
DB_PORT: ${{ matrix.db_port }}
|
|
||||||
DB_PASSWORD: hunter2
|
|
||||||
SECRET_KEY: beepbeep
|
SECRET_KEY: beepbeep
|
||||||
DEBUG: true
|
DEBUG: false
|
||||||
DOMAIN: your.domain.here
|
DOMAIN: your.domain.here
|
||||||
BOOKWYRM_DATABASE_BACKEND: postgres
|
BOOKWYRM_DATABASE_BACKEND: postgres
|
||||||
MEDIA_ROOT: images/
|
MEDIA_ROOT: images/
|
||||||
|
@ -66,4 +53,4 @@ jobs:
|
||||||
EMAIL_USE_TLS: true
|
EMAIL_USE_TLS: true
|
||||||
ENABLE_PREVIEW_IMAGES: true
|
ENABLE_PREVIEW_IMAGES: true
|
||||||
run: |
|
run: |
|
||||||
pytest
|
pytest -n 3
|
||||||
|
|
|
@ -23,3 +23,4 @@ coverage==5.1
|
||||||
pytest-django==4.1.0
|
pytest-django==4.1.0
|
||||||
pytest==6.1.2
|
pytest==6.1.2
|
||||||
pytest-cov==2.10.1
|
pytest-cov==2.10.1
|
||||||
|
pytest-xdist==2.3.0
|
||||||
|
|
Loading…
Reference in a new issue