mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Continous Integration
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
ci-job:
|
|
runs-on: ubuntu-20.04
|
|
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_prod.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 test
|