问题描述
我是Github CI的新手,并尝试使用特定的用户名和密码设置Mysql以按照以下.github / workflow文件测试我的Django项目,但是当systemctl启动mysql时发生错误:
Run sudo systemctl start mysql.service
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
##[error]Process completed with exit code 1.
在github操作日志中可见。问题是:我怎么知道出了什么问题?例如,是否可以查看journalctl -xe的输出?欢迎其他想法。
这是我的工作流程文件:
name: Django CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6,3.7,3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up MySQL 5.7
uses: mirromutth/mysql-action@master
with:
mysql version: 5.7
mysql database: apis
mysql root password: mypassword
mysql user: myuser
mysql password: myotherpassword
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
sudo systemctl start mysql.service
python manage.py test
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)