Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Update readme

Update readme #17

Workflow file for this run

name: Tests Pipeline
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
env:
django_test_args: '-Wa'
jobs:
build:
name: Tests Pipeline (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11]
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: 'secret'
MYSQL_DATABASE: 'boilerplate'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'secret'
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- 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: Prepare Env Variables
run: sed -i "s/3306/${{ job.services.mysql.ports['3306'] }}/g" .env.testing
- name: Create environment file
run: cp .env.testing .env
- name: Create database tables
run: |
# mkdir mynewapp/migrations
# touch mynewapp/migrations/__init__.py
# python manage.py makemigrations
python manage.py migrate
- name: Create super user
run: python manage.py loaddata app/fixtures/auth_user
- name: Run Tests
run: python ${{ env.django_test_args }} manage.py test