Skip to content

Update django.yml

Update django.yml #9

Workflow file for this run

name: Django CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9]
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: video
MYSQL_PASSWORD: 4643830
MYSQL_ROOT_PASSWORD: 4643830
ports:
- 3306:3306
# This can be used to ensure MySQL is ready for accepting connections
options: >-
--health-cmd "mysqladmin --protocol=TCP ping -h localhost --silent"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test --keepdb