init commit
This commit is contained in:
40
.drone.yml
Normal file
40
.drone.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build_test_local
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: docker:27
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
commands:
|
||||
- docker compose -f docker-compose.yml build --pull
|
||||
|
||||
- name: migrate
|
||||
image: docker:27
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
commands:
|
||||
- docker compose up -d db
|
||||
- |
|
||||
for i in $(seq 1 60); do
|
||||
if docker compose ps db | grep -q "(healthy)"; then
|
||||
echo "DB healthy"; break
|
||||
fi
|
||||
echo "Waiting DB... $i"
|
||||
sleep 2
|
||||
done
|
||||
- docker compose run --rm bot alembic upgrade head
|
||||
|
||||
- name: lint
|
||||
image: python:3.12-slim
|
||||
commands:
|
||||
- pip install ruff==0.5.7
|
||||
- ruff check services/bot
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
Reference in New Issue
Block a user