-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
64 deletions.
There are no files selected for viewing
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,71 @@ | ||
name: Django CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
db: | ||
image: postgis/postgis:11-2.5 | ||
env: | ||
POSTGRES_USER: bb | ||
POSTGRES_PASSWORD: bb | ||
POSTGRES_DB: test_bluebottle_test | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.23 | ||
env: | ||
discovery.type: single-node | ||
options: >- | ||
--health-cmd "curl http://localhost:9200/_cluster/health" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 10 | ||
ports: | ||
- 9200:9200 | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
celery: | ||
image: celery | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install packages | ||
run: sudo apt-get install -y libxmlsec1 libxmlsec1-dev libgdal-dev openjdk-8-jdk-headless | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Test data | ||
run: | | ||
psql -h localhost -U bb test_bluebottle_test < testdata.sql | ||
env: | ||
PGPASSWORD: bb | ||
- name: Setup Locale | ||
run: | | ||
export LC_ALL="en_US.UTF-8" | ||
export LC_CTYPE="en_US.UTF-8" | ||
sudo dpkg-reconfigure locales | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ hashFiles('setup.py') }}-${{ hashFiles('setup.py') }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[test] --trusted-host github.com | ||
- name: Run Tests | ||
run: | | ||
python -m coverage run --parallel-mode --source=bluebottle manage.py test --parallel=8 --keepdb --settings bluebottle.settings.github |
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
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,18 @@ | ||
# flake8: noqa | ||
|
||
from .testing import * | ||
|
||
DATABASES = { | ||
'default': { | ||
"ENGINE": "bluebottle.clients.postgresql_backend", | ||
'HOST': 'localhost', | ||
'PORT': '5432', | ||
'NAME': 'bluebottle_test', | ||
'USER': 'bb', | ||
'PASSWORD': 'bb' | ||
} | ||
} | ||
|
||
PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher'] | ||
|
||
DEBUG = False |
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
This file was deleted.
Oops, something went wrong.