Skip to content

Occurrence modelin mallinnus #369

Occurrence modelin mallinnus

Occurrence modelin mallinnus #369

Workflow file for this run

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.7, 3.8, 3.9]
services:
mysql:
image: mariadb:10.9.6
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_USER: test_user
MARIADB_PASSWORD: password
MARIADB_DATABASE: test_db
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
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
working-directory: ./app
- name: Setup database privileges
env:
DB_USER: root
DB_PASS: password
run: |
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'test_user'@'%';" -u${{ env.DB_USER }} -p${{ env.DB_PASS }} -h 127.0.0.1 -P 3306
- name: Run Tests
env:
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_NAME: test_db
DB_USER: test_user
DB_PASS: password
ITIS_CACHE: ./itis_cache
working-directory: ./app
run: |
python manage.py test