InvenTree/.github/workflows/mysql.yaml

40 lines
883 B
YAML
Raw Normal View History

2021-03-31 06:18:04 +00:00
# MySQL Unit Testing
name: MySQL
on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
2021-03-31 06:28:30 +00:00
image: mysql:5.7
2021-03-31 06:18:04 +00:00
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
2021-03-31 06:34:12 +00:00
MYSQL_DATABASE: inventree_test_db
MYSQL_USER: inventree
MYSQL_PASSWORD: password
2021-03-31 06:28:30 +00:00
ports:
- 3306
2021-03-31 06:18:04 +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: |
cd InvenTree
python3 manage.py test --settings=InvenTree.ci_mysql