Update django.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Django CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Redis Server in GitHub Actions | |
# You may pin to the exact commit or the version. | |
# uses: supercharge/redis-github-action@f63fe516254d0af5df91755a4488274c2e71e38c | |
uses: supercharge/redis-github-action@1.5.0 | |
with: | |
# Redis image to use. Useful if you need to run a custom Redis image | |
redis-image: redis | |
# Redis version to use | |
redis-version: 6.0.8 | |
# Redis port to use and expose | |
redis-port: 6379 | |
# Name of the created container. Useful if you run multiple Redis containers | |
redis-container-name: redis | |
- name: Install Dependencies and Start Virtual Environment | |
# also verifies if redis docker image is running | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install | |
printf "\n\nREDIS\n" | |
docker ps | grep redis | |
printf "\n\n" | |
pipenv run python manage.py makemigrations | |
pipenv run python manage.py migrate | |
pipenv run python manage.py runserver |