Skip to content

refactor(#9): 移除类 DatabaseOperationMixin 中不再需要的事务相关方法。 #68

refactor(#9): 移除类 DatabaseOperationMixin 中不再需要的事务相关方法。

refactor(#9): 移除类 DatabaseOperationMixin 中不再需要的事务相关方法。 #68

Workflow file for this run

name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
container: python:3.8
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
ports:
- 6379/tcp
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
python setup.py install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
apt-get update -y
apt-get install -y default-mysql-client
mysql --host mysql --port 3306 -u root -proot -e 'CREATE DATABASE nest_unittest CHARACTER SET utf8mb4'
mysql --host mysql --port 3306 -u root -proot nest_unittest < ./nest/repository/DDL/init_nest.sql
MODE=unittest pytest -ra -s -x