Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

프로젝트 구조 & 패키지 버전 최신화 #19

Merged
merged 4 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DB_USERNAME=test-user
DB_PASSWORD=password
DB_NAME=testdb
DB_HOST=127.0.0.1
DB_PORT=3307
SLACK_API_TOKEN=""
27 changes: 25 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,27 @@ jobs:
pytest:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: test-user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: root-password
MYSQL_DATABASE: testdb
ports:
- 3307:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

env:
env: test

steps:
- uses: actions/checkout@v3

- name: change mysql charset
run: mysql -h 127.0.0.1 -P 3307 -u root -p'root-password' -e "ALTER DATABASE testdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"

- name: Install poetry
run: pipx install poetry

Expand Down Expand Up @@ -41,6 +59,11 @@ jobs:
path: "./waffledotcom/test.xml"
reporter: java-junit

- name: Check Pylint
- name: Check Ruff
uses: chartboost/ruff-action@v1

- name: Run alembic migration test
run: |
poetry run pylint -rn -sn --rcfile=${GITHUB_WORKSPACE}/.pylintrc ./waffledotcom
mkdir -p waffledotcom/src/database/migrations/versions
ls waffledotcom/src/database/migrations/versions/* || poetry run alembic revision --autogenerate
poetry run alembic upgrade head
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ node_modules

*.local
*.pickle
.DS_Store
/install-pyenv-win.ps1
13 changes: 0 additions & 13 deletions .isort.cfg

This file was deleted.

15 changes: 4 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@ repos:
hooks:
- id: isort

- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.291
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args: [
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Link to your config file
]
- id: ruff
Loading