|
|
- name: Django CI
-
- on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
- jobs:
- build:
-
- runs-on: ubuntu-latest
- strategy:
- max-parallel: 4
- matrix:
- db: [sqlite, postgres, mysql]
- python-version: [3.6, 3.7, 3.8]
-
- services:
- postgres:
- image: postgres:10
- env:
- POSTGRES_USER: hc
- POSTGRES_PASSWORD: hunter2
- options: >-
- --health-cmd pg_isready
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
- - 2020:5432
- mysql:
- image: mysql:5.7
- env:
- MYSQL_USER: hc
- MYSQL_PASSWORD: hunter2
- ports:
- - 2020:3306
- options: >-
- --health-cmd="mysqladmin ping"
- --health-interval=10s
- --health-timeout=5s
- --health-retries=3
-
- 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.txt
- pip install braintree mysqlclient apprise
- - name: Run Tests
- env:
- DB: ${{ matrix.db }}
- DB_HOST: 127.0.0.1
- DB_PORT: 2020
- DB_USER: hc
- DB_PASSWORD: hunter2
- run: |
- python manage.py test
|