我提交时从GitLab收到以下错误:
(<unknown>): did not find expected '-' indicator while parsing a block collection at line 29 column 5
该文件在两次提交之间没有更改,但过去成功后,现在却以某种方式失败。
.gitlab-ci.yaml
image: 'ubuntu:latest'
stages:
- test
- pages
before_script:
- apt-get update -y && apt-get upgrade -y
- apt-get install -y python3.7 python3-pip xvfb qt5-default
test:
stage: test
except:
changes:
- CHANGELOG.txt
- README.RST
- requirements.txt
- tools
- LICENSE
- example.py
- setup.py
script:
- python3.7 -m pip install pyqt5 pytest pytest-qt pytest-cov
- python3.7 setup.py install
- xvfb-run python3.7 -m pytest --cov=NodalPy tests/
pages:
script:
- python3.7 -m pip install sphinx sphinx-rtd-theme
- sphinx-build docs/source docs/build
- mkdir public
- sphinx-build docs/source docs/build
- mv docs/build/ public/
artifacts:
paths:
- public
only:
- master
答案 0 :(得分:1)
artifacts
缩进不正确,必须与script
处于同一级别
pages:
script:
- python3.7 -m pip install sphinx sphinx-rtd-theme
- sphinx-build docs/source docs/build
- mkdir public
- sphinx-build docs/source docs/build
- mv docs/build/ public/
artifacts:
paths:
- public
only:
- master