@@ -3,48 +3,24 @@ name: Testing {{cookiecutter.project_name}}
33on : push
44
55jobs :
6- black :
6+ lint :
7+ strategy :
8+ matrix :
9+ cmd :
10+ - black
11+ - ruff
12+ - mypy
713 runs-on : ubuntu-latest
814 steps :
9- - uses : actions/checkout@v2
10- - name : Set up Python
11- uses : actions/setup-python@v2
12- with :
13- python-version : ' 3.9'
14- - name : Install deps
15- uses : knowsuchagency/poetry-install@v1
16- env :
17- POETRY_VIRTUALENVS_CREATE : false
18- - name : Run black check
19- run : poetry run black --check .
20- flake8 :
21- runs-on : ubuntu-latest
22- steps :
23- - uses : actions/checkout@v2
24- - name : Set up Python
25- uses : actions/setup-python@v2
26- with :
27- python-version : ' 3.9'
28- - name : Install deps
29- uses : knowsuchagency/poetry-install@v1
30- env :
31- POETRY_VIRTUALENVS_CREATE : false
32- - name : Run flake8 check
33- run : poetry run flake8 --count .
34- mypy :
35- runs-on : ubuntu-latest
36- steps :
37- - uses : actions/checkout@v2
15+ - uses : actions/checkout@v4
3816 - name : Set up Python
39- uses : actions/setup-python@v2
17+ uses : actions/setup-python@v5
4018 with :
41- python-version : ' 3.9 '
19+ python-version : ' 3.11 '
4220 - name : Install deps
43- uses : knowsuchagency/poetry-install@v1
44- env :
45- POETRY_VIRTUALENVS_CREATE : false
46- - name : Run mypy check
47- run : poetry run mypy .
21+ run : poetry install
22+ - name : Run lint check
23+ run : poetry run pre-commit run -a {{ '${{' }} matrix.cmd {{ '}}' }}
4824 pytest :
4925 runs-on : ubuntu-latest
5026 {%- if ((cookiecutter.db_info.name != "none" and cookiecutter.db_info.name != "sqlite") or
@@ -63,17 +39,16 @@ jobs:
6339 {%- endif %}
6440 {%- if cookiecutter.db_info.name == "mysql" %}
6541 MYSQL_ROOT_PASSWORD : " {{ cookiecutter.project_name }}"
66- MYSQL_ROOT_USER : " {{ cookiecutter.project_name }}"
42+ MYSQL_USER : " {{ cookiecutter.project_name }}"
6743 MYSQL_DATABASE : " {{ cookiecutter.project_name }}"
68- MYSQL_AUTHENTICATION_PLUGIN : " mysql_native_password"
6944 {%- endif %}
7045 {%- if cookiecutter.db_info.name == "mongodb" %}
7146 MONGO_INITDB_ROOT_USERNAME : " {{ cookiecutter.project_name }}"
7247 MONGO_INITDB_ROOT_PASSWORD : " {{ cookiecutter.project_name }}"
7348 {%- endif %}
7449 {%- if cookiecutter.db_info.name == "mysql" %}
7550 options : >-
76- --health-cmd="mysqladmin ping -u root "
51+ --health-cmd="mysqladmin ping --user={{ cookiecutter.project_name }} --password={{ cookiecutter.project_name }} "
7752 --health-interval=15s
7853 --health-timeout=5s
7954 --health-retries=6
0 commit comments