Skip to content
Snippets Groups Projects
Commit bf6f06c9 authored by Alán Muñoz's avatar Alán Muñoz
Browse files

add ci

parent fce9998a
No related branches found
No related tags found
No related merge requests found
image: python:3.7
stages:
- test
- check
- deploy
before_script:
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- export PATH="$PATH:$HOME/.poetry/bin/"
- source $HOME/.poetry/env
- test -e $HOME/.poetry/bin/ || curl -sSL curl -sSL https://install.python-poetry.org | python3 -
- export PATH="$PATH:$HOME/.local/bin/"
- poetry config virtualenvs.create false
- rm -f poetry.lock
- pip install --upgrade pip
- poetry install
- source `poetry env info --path`/bin/activate
build:
stage: build
Unit test:
stage: test
script:
- echo 123
- pytest ./tests/
test:
stage: test
Python Code Lint:
stage: check
script:
- black .
Static Type:
stage: check
script:
- mypy . --exclude 'setup\.py$'
# We can remove the flag once this is resolved https://github.com/pypa/setuptools/issues/2345
Publish to pypi and update repository:
stage: deploy
script:
- echo 123
- poetry version ${BUMP_RULE}
- git config --global user.email ${GITLAB_USER_EMAIL}
- git config --global user.name ${GITLAB_USER_NAME}
- git add pyproject.toml
- git commit -m "Bump version"
- git remote add origin https://${ACCESS_TOKEN_NAME}:${ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git && git push -o ci.skip origin HEAD:master
- poetry publish --build --username ${PYPI_USER} --password ${PYPI_PASSWORD}
only:
- master
......@@ -6,14 +6,6 @@ authors = ["Alan Munoz <alan.munoz@ed.ac.uk>"]
[tool.poetry.dependencies]
python = ">=3.7.1,<3.11"
# extraction = {git = "ssh://git@git.ecdf.ed.ac.uk/swain-lab/python-pipeline/extraction"}
# postprocessor = {git = "ssh://git@git.ecdf.ed.ac.uk/swain-lab/python-pipeline/post-processing"}
# baby = {git = "ssh://git@git.ecdf.ed.ac.uk/swain-lab/python-pipeline/baby"}
# logfile_parser = {git = "ssh://git@git.ecdf.ed.ac.uk/swain-lab/python-pipeline/logfile_parser"}
# extraction = {path="../extraction", develop=false}
# postprocessor = {path="../postprocessor", develop=false}
# baby = {path="../baby", develop=false}
# logfile_parser = {path="../logfile_parser", develop=false}
ray = {version = "1.4.0", extras = ["tune"]}
numpy = "^1.21.4"
dask = "^2021.12.0"
......@@ -37,7 +29,10 @@ aliby-baby = "*"
[tool.poetry.dev-dependencies]
black = "^21.9b0"
black = "^21.12b0"
Sphinx = "^4.3.2"
pytest = "^6.2.5"
mypy = "^0.930"
[build-system]
requires = ["setuptools", "poetry-core>=1.0.0"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment