InvenTree/.github/workflows/mariadb.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

2021-03-31 09:20:10 +00:00
name: MariaDB
on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.mysql
2021-03-31 10:48:54 +00:00
INVENTREE_DB_NAME: inventree
INVENTREE_DB_USER: root
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 3306
2021-03-31 10:17:17 +00:00
INVENTREE_DEBUG: info
2021-03-31 11:31:50 +00:00
INVENTREE_MEDIA_ROOT: ./media
INVENTREE_STATIC_ROOT: ./static
2021-03-31 09:20:10 +00:00
services:
mariadb:
image: mariadb:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
2021-03-31 10:54:13 +00:00
MYSQL_DATABASE: inventree
2021-03-31 09:20:10 +00:00
MYSQL_USER: inventree
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
2021-03-31 09:46:26 +00:00
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: |
sudo apt-get install mysql-server libmysqlclient-dev
pip3 install invoke
pip3 install mysqlclient
invoke install
- name: Run Tests
run: invoke test