drone-ci testing
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Andrei Stoica 2023-05-15 22:48:56 -04:00
parent 13250151ea
commit 3f16f3a964
1 changed files with 15 additions and 7 deletions

View File

@ -1,14 +1,19 @@
--- ---
kind: pipeline kind: pipeline
name: test name: test
environment:
project_name: rgraph
steps: steps:
- name: db-up - name: db-up
image: docker/compose:alpine-1.29.2 image: docker/compose:alpine-1.29.2
environment: environment:
POSTGRES_USER: rgraph POSTGRES_USER:
POSTGRES_PASSWORD: rgraph from_secrets: TESTING_USER
POSTGRES_DB: rgraph POSTGRES_PASSWORD:
from_secrets: TESTING_PASSWORD
POSTGRES_DB:
from_secrets: TESTING_DB
volumes: volumes:
- name: docker_sock - name: docker_sock
path: /var/run/docker.sock path: /var/run/docker.sock
@ -18,9 +23,12 @@ steps:
- name: test - name: test
image: python:3.10-alpine image: python:3.10-alpine
environment: environment:
POSTGRES_USER: POSTGRES_USER:
POSTGRES_USER: rgraph from_secrets: TESTING_USER
POSTGRES_PASSWORD: rgraph POSTGRES_PASSWORD:
from_secrets: TESTING_PASSWORD
POSTGRES_DB:
from_secrets: TESTING_DB
commands: commands:
- hostip=$(ip route show | awk '/default/ {print $3}') - hostip=$(ip route show | awk '/default/ {print $3}')
- export POSTGRES_URL=$hostip - export POSTGRES_URL=$hostip
@ -29,7 +37,7 @@ steps:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install . - pip install .
- pytest - pytest
- name: db-down - name: db-cleanup
image: docker/compose:alpine-1.29.2 image: docker/compose:alpine-1.29.2
volumes: volumes:
- name: docker_sock - name: docker_sock