File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
on :
4
4
push :
5
- branches :
6
- - main
5
+ branches : " *"
7
6
8
7
jobs :
9
8
static-analysis : # mypy, black, ruff 등 정적 분석만 실행
60
59
test : # mypy와 직렬로 실행하게되면 시간이 너무 오래 걸려서 test와 정적 타입분석은 병렬로 실행
61
60
runs-on : ubuntu-22.04
62
61
62
+ env :
63
+ MYSQL_HOST : 127.0.0.1
64
+ MYSQL_PORT : 3306
65
+ MYSQL_USER : root
66
+ MYSQL_PASSWORD : 1234
67
+ MYSQL_DATABASE : when2meet
68
+
63
69
steps :
64
70
- name : Check out the codes
65
71
uses : actions/checkout@v2
@@ -96,6 +102,17 @@ jobs:
96
102
if : steps.cache-venv.outputs.cache-hit != 'true'
97
103
run : poetry install --no-root
98
104
105
+ - name : Set timezone to KST
106
+ run : |
107
+ sudo rm /etc/localtime
108
+ sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime
109
+
110
+ - name : Start MySQL
111
+ run : |
112
+ sudo systemctl start mysql
113
+ mysql -e "use mysql; FLUSH PRIVILEGES; ALTER USER '${{ env.MYSQL_USER }}'@'localhost' IDENTIFIED BY '${{ env.MYSQL_PASSWORD }}';" -uroot -proot
114
+ mysql -e 'CREATE DATABASE ${{ env.MYSQL_DATABASE }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASSWORD }}
115
+
99
116
- name : Run tests # 커버리지로 pytest를 실행하고 결과 report를 출력한다.
100
117
run : |
101
118
poetry run coverage run -m pytest .
You can’t perform that action at this time.
0 commit comments