Skip to content
Snippets Groups Projects
Commit 41de2fce authored by dilawar's avatar dilawar :ant:
Browse files

chore: Added pipeline.

parent b9b26857
No related branches found
No related tags found
No related merge requests found
Pipeline #3581 canceled with stages
image: python:3.8-slim-buster
stages:
- build
- test
- deploy
before_script:
- apt update && apt install -y make docker docker-compose
- docker run hello-world
- cd bitia_runner && make bootstrap
build:
stage: build
tags:
- linux
script:
- make ci
test:
stage: test
tags:
- linux
script:
- python3 -m pip install .
- make test
- bash ./tests/cli_in_docker/run_tests.sh
deploy:
stage: deploy
tags:
- linux
script:
- python3 -m pip install poetry
- poetry install
- poetry version "$(poetry version -s).dev$(date +%Y%m%d)"
- make wheel
- make upload
Makefile 0 → 100644
PYTHON := $(shell which python3)
POETRY := $(shell which poetry)
MYPY_OPTS:=--ignore-missing-imports --install-types --non-interactive
all : lint build
ci: bootstrap build test
bootstrap:
$(PYTHON) -m ensurepip
$(PYTHON) -m pip install poetry
build: check
$(POETRY) build
check: lint
$(POETRY) install
$(POETRY) run mypy $(MYPY_OPTS) bitia tests
lint:
$(POETRY) install
$(POETRY) run pylint -E bitia tests
test: lint build
$(POETRY) run pytest tests bitia
fix:
$(POETRY) run black bitia
$(POETRY) run black tests
gr runner gitlab-runner:
gitlab-runner exec docker build
gitlab-runner exec docker test
gitlab-runner exec docker deploy
test_pipeline: install
$(POETRY) run bitia_runner run tests/test_20220727
wheel:
rm -rf dist/*.whl
$(POETRY) build
upload:
$(POETRY) run twine upload dist/*.whl -u __token__ -p $$BITIA_PYPI_TOKEN || echo "Failed to upload"
.PHONY : copr fix test install lint build \
all check bootstrap test_pipeline \
runner gitlab-runner image image_upload
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