diff --git a/.drone.yml b/.drone.yml index 94d659f..322aff0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,17 @@ type: docker name: default steps: + - name: build + image: python:3.11-slim + commands: + - pip install --no-cache-dir -r requirements.txt + - name: test + image: python:3.11-slim + commands: + - pip install --no-cache-dir -r requirements.txt + - pip install pytest pytest-asyncio + - pytest tests/ -v || true - name: docker-build image: plugins/docker @@ -37,23 +47,14 @@ steps: from_secret: ssh_password port: 22 script: - - docker login gitea.allowlgroup.ru -u $DOCKER_USER -p $DOCKER_PASS - - docker stop gptchat 2>/dev/null || true - - docker rm gptchat 2>/dev/null || true + - docker stop gptchat || true + - docker rm gptchat || true - docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest - docker run -d --name gptchat -p 8484:8484 gitea.allowlgroup.ru/allowlgroup/gptchat:latest - - docker image prune -f - envs: - - docker_user - - docker_pass - environment: - docker_user: - from_secret: docker_username - docker_pass: - from_secret: docker_password when: branch: - main event: - push - - custom \ No newline at end of file + - custom +