nichijou/.gitlab-ci.yml

50 lines
813 B
YAML
Raw Normal View History

2023-04-14 14:24:12 -04:00
image: python:3.9.16-slim-bullseye
2022-04-02 09:24:17 -04:00
2019-12-13 19:44:34 -05:00
stages:
- analyse
- test
- deploy
2022-04-02 09:24:17 -04:00
cache:
paths:
- .venv/
2023-04-14 14:24:12 -04:00
- /.cache/poetry
2022-04-02 09:24:17 -04:00
.setup_build: &setup_build
2022-04-02 09:24:17 -04:00
- apt-get update
- apt-get dist-upgrade -y
- >
apt-get install --no-install-recommends -y
2023-04-14 14:24:12 -04:00
curl
2022-04-02 09:24:17 -04:00
git
make
plantuml
python3
2023-04-14 14:24:12 -04:00
python3-distutils
2022-04-02 09:24:17 -04:00
rsync
- ln -s /usr/bin/python3 /usr/bin/python
2023-04-14 14:24:12 -04:00
- curl -sSL https://install.python-poetry.org | python3 - --version 1.4.1
- export PATH="/root/.local/bin:$PATH"
2022-04-02 09:24:17 -04:00
2023-04-14 14:24:12 -04:00
doc:
2019-12-13 19:44:34 -05:00
stage: test
2022-04-02 09:24:17 -04:00
needs: []
2019-12-13 19:44:34 -05:00
script:
2022-04-02 09:24:17 -04:00
- *setup_build
2023-04-14 14:24:12 -04:00
- poetry install -n
2019-12-13 19:44:34 -05:00
- make
artifacts:
paths:
2023-04-14 14:24:12 -04:00
- build/doc
2019-12-13 19:44:34 -05:00
2022-04-02 09:24:17 -04:00
pages:
2019-12-13 19:44:34 -05:00
stage: deploy
2022-04-02 09:24:17 -04:00
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
2023-04-14 14:24:12 -04:00
needs: ["doc"]
2019-12-13 19:44:34 -05:00
script:
2023-04-14 14:24:12 -04:00
- mv build/doc public
2022-04-02 09:24:17 -04:00
artifacts:
paths:
- public