diff --git a/.woodpecker.yml b/.woodpecker.yml index 32f14cd..826dc8b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,9 +7,9 @@ pipeline: commands: - pip install virtualenv - make env - # - make lint - # - make coverage - - make integration-test + - make lint + - make coverage + # - make integration-test secrets: [ STRIPE_PUBLIC_KEY, STRIPE_SECRET_KEY ] services: diff --git a/Makefile b/Makefile index 4246fe6..ea1b85f 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ docker: ## Build Docker image from source env: ## Install all dependencies @-virtualenv venv . ./venv/bin/activate && pip install -r requirements.txt + . ./venv/bin/activate && ./integration/ci.sh freeze: ## Freeze python dependencies @. ./venv/bin/activate && pip freeze > requirements.txt diff --git a/docker-compose-dev-deps.yml b/docker-compose-dev-deps.yml index deb069d..5f50ba3 100644 --- a/docker-compose-dev-deps.yml +++ b/docker-compose-dev-deps.yml @@ -8,22 +8,22 @@ version: "3" services: - #gitea: - # image: gitea/gitea:1.16.5 - # container_name: hostea-dash-gitea - # network_mode: host - # environment: - # - USER_UID=1000 - # - USER_GID=1000 - # restart: always - # #networks: - # # - hostea-dash-gitea - # volumes: - # - /etc/timezone:/etc/timezone:ro - # - /etc/localtime:/etc/localtime:ro - # #ports: - # # - "8080:3000" - # # - "2221:22" + gitea: + image: gitea/gitea:1.16.5 + container_name: hostea-dash-gitea + network_mode: host + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + #networks: + # - hostea-dash-gitea + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + #ports: + # - "8080:3000" + # - "2221:22" smtp: image: maildev/maildev:latest diff --git a/integration/ci.sh b/integration/ci.sh index ef709ff..8d0bfb9 100755 --- a/integration/ci.sh +++ b/integration/ci.sh @@ -6,15 +6,24 @@ source integration/lib.sh main() { - docker_compose_down || true - docker_compose_up - setup_env - wait_for_env + # CI runes these dependencies as part of its config, so skipping + # spinning up deps if running from within CI, + + if [ -z ${CI+x} ]; + then + docker_compose_down || true + docker_compose_up + setup_env + wait_for_env + fi gitea_root support_repo_init fleet_repo_init - teardown_env - docker_compose_down + if [ -z ${CI+x} ]; + then + teardown_env + docker_compose_down + fi } main