This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
BirdsiteLIVE/.drone.yml
Sam Therapy e2ec4a5857
Some checks failed
continuous-integration/drone Build is failing
format things, I think
also prepare pipelines and stuff

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-11-15 17:25:54 +01:00

65 lines
1.3 KiB
YAML

kind: pipeline
name: testing
type: docker
steps:
- name: Install Dependencies
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet restore ./src
- name: Build
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet build --configuration Release --no-restore ./src
- name: Test
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- sed -i "s/127\.0\.0\.1/database/g" ./src/Tests/BirdsiteLive.DAL.Postgres.Tests/DataAccessLayers/Base/PostgresTestingBase.cs
- dotnet test --no-restore --verbosity minimal ./src
services:
- name: database
image: postgres:15
environment:
POSTGRES_USER: birdtest
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: birdsitetest
---
kind: pipeline
name: docker-publish
type: docker
depends_on:
- testing
steps:
- name: Build
image: plugins/docker
settings:
repo: git.froth.zone/sam/BirdsiteLIVE
dry_run: true
when:
event:
- pull_request
depends_on:
- "clone"
- name: Build & Publish
image: plugins/docker
settings:
registry: git.froth.zone
username: sam
password:
from_secret: password
repo: git.froth.zone/sam/BirdsiteLIVE
tags: latest
when:
branch:
- master
event:
- push
depends_on:
- "clone"