Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add github workflow for continuous integration
Roland Geiderccd1b2199275
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644index 000000000..be555a798--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,46 @@+name: Continous Integration++on: [pull_request, push]++jobs:+ runs-on: ubuntu-latest+ strategy:+ matrix:+ python-version: [ 3.6, 3.7, 3.8 ]++ services:+ postgres:+ image: postgres:12.0-alpine+ env:+ POSTGRES_USER: wger+ POSTGRES_PASSWORD: wger+ POSTGRES_DB: wger+ ports:+ - 5432:5432+ # needed because the postgres container does not provide a health check+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5+++ steps:+ - uses: actions/checkout@v2++ - name: Set up Python ${{ matrix.python-version }}+ uses: actions/setup-python@v2+ with:+ python-version: ${{ matrix.python-version }}++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -r requirements_dev.txt+ python setup.py develop++ - name: Test the application (Postgres)+ run: |+ wger create-settings --database-type postgresql+ python3 manage.py test++ - name: Test the application (Sqlite)+ run: |+ wger create-settings+ python3 manage.py testdiff --git a/wger/tasks.py b/wger/tasks.pyindex bc73c2a20..4627ba1f1 100644--- a/wger/tasks.py+++ b/wger/tasks.py@@ -125,14 +125,13 @@ def create_settings(context,with open(settings_template, 'r') as settings_file:settings_content = settings_file.read()- # The environment variable is set by travis during testingif database_type == 'postgresql':dbengine = 'postgresql_psycopg2'- dbname = 'test_wger'- dbuser = 'postgres'- dbpassword = ''- dbhost = '127.0.0.1'- dbport = ''+ dbname = 'wger'+ dbuser = 'wger'+ dbpassword = 'wger'+ dbhost = 'localhost'+ dbport = 5432elif database_type == 'sqlite3':dbengine = 'sqlite3'dbname = dbpath_value