| name: Django CI |
| |
| on: |
| push: |
| branches: [ develop ] |
| pull_request: |
| branches: [ develop ] |
| |
| jobs: |
| build: |
| |
| runs-on: ubuntu-latest |
| strategy: |
| max-parallel: 4 |
| matrix: |
| python-version: [3.7, 3.8] |
| |
| services: |
| mysql: |
| image: mysql:5.7 |
| env: |
| MYSQL_ROOT_PASSWORD: mysql |
| MYSQL_DATABASE: fineract_credit_scorecard |
| ports: |
| - '3306: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 |
| |
| - name: Run Migrations |
| run: python manage.py migrate |
| |
| - name: Run Tests |
| run: | |
| python manage.py test |