From 3521f249a7df43156c218aa907b9a479dcb355ac Mon Sep 17 00:00:00 2001 From: Xander Sigler Date: Wed, 26 Jan 2022 21:18:10 -0800 Subject: [PATCH] Added test cases to build and updated CI to use proper directories when copying --- .drone.yml | 8 ++++++++ AOC2021/Dockerfile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f4ce686..e30c987 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,6 +8,12 @@ steps: commands: - echo 'Starting build pipeline for AOC2021' +- name: test + image: mcr.microsoft.com/dotnet/sdk:5.0 + commands: + - cd AOC2021.Test + - dotnet test + - name: build-aoc-2021 image: plugins/docker settings: @@ -17,6 +23,8 @@ steps: from_secret: docker_password repo: 97waterpolo/aoc-2021 dockerfile: AOC2021/Dockerfile + depends_on: + - test - name: finish image: busybox diff --git a/AOC2021/Dockerfile b/AOC2021/Dockerfile index 229a2cb..a226516 100644 --- a/AOC2021/Dockerfile +++ b/AOC2021/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src -COPY ["AOC2021.csproj", "AOC2021/"] +COPY ["AOC2021/AOC2021.csproj", "AOC2021/"] RUN dotnet restore "AOC2021/AOC2021.csproj" COPY [".", "AOC2021/."] WORKDIR "/src/AOC2021"