mailApp/.drone.yml

41 lines
1.2 KiB
YAML
Raw Normal View History

2021-11-05 14:17:36 +10:00
kind: pipeline
type: docker
name: mailApp
trigger:
branch:
- master
event:
- push
steps:
- name: postgresDBTest # Test that the service is ready to be acted upon for cargo tests
image: postgres:12-alpine
2021-11-08 13:04:51 +10:00
environment:
PGPASSWORD: password
DATABASE_URL: postgres://postgres:password@postgres:5432/newsletter
commands:
- sleep 35
2021-11-08 13:07:55 +10:00
- "psql -U postgres -d newsletter -h postgres"
- name: sqlxMigrate
2021-11-05 14:17:36 +10:00
image: rust:1.56
commands:
- apt update && apt install -y build-essential pkg-config libssl-dev # Dependancies for sqlx
- cargo install --version=0.5.7 sqlx-cli --no-default-features --features postgres # Install sqlx
- sqlx migrate run
- name: test
image: rust:1.56
commands:
- apt update && apt install -y build-essential pkg-config libssl-dev # Dependancies for tarpaulin
- cargo install cargo-tarpaulin
- cargo tarpaulin -v --all-features --timeout 120 --color always # RUN THOSE TESTS
services:
- name: postgres
2021-11-08 13:01:20 +10:00
image: postgres:12-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: newsletter