InvenTree/.github/workflows/mysql.yaml
2021-03-31 17:18:04 +11:00

37 lines
824 B
YAML

# MySQL Unit Testing
name: MySQL
on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
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: Create Database
run: |
mysql -e 'CREATE DATABASE inventree_test_db;'
- name: Run Tests
run: |
cd InvenTree
python3 manage.py test --settings=InvenTree.ci_mysql