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 environment: PGPASSWORD: password DATABASE_URL: postgres://postgres:password@postgres:5432/newsletter commands: - sleep 35 - "psql -U postgres -d newsletter -h postgres" - name: sqlxMigrate image: rust:1.57 environment: DATABASE_URL: postgres://postgres:password@postgres:5432/newsletter SKIP_DOCKER: from_secret: SKIP_DOCKER 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 database create - sqlx migrate run - name: test image: rust:1.57 environment: APP_ENVIRONMENT: drone 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 image: postgres:12 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_DB: newsletter